web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to Extract Text fr...
Power Automate
Unanswered

How to Extract Text from Images Pasted in Emails ( with OCR )

(0) ShareShare
ReportReport
Posted on by 10

Hi everyone, I'm new to the community, I'm just getting started in this beautiful tool. I have a query. Every week I receive emails with images pasted in the body of the email with numbers and I want to extract those numerical data to keep a weekly control, because they are fuel prices. Could someone help and indicate how I could do the flow? Very grateful for your contributions.

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Davidvarela 

     

    If possible pls share screenshot of you email with image after hiding all sensitive info?

  • Davidvarela Profile Picture
    10 on at

    Thank you for your support, in the attached image, this is how I receive it in the body of the mail, I do not see it as attached, my client, cuts and pastes it in the body of the mail and I need to extract the data that is observed.

    CAPTURA.png
  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Davidvarela 

     

    Are you sure those data are in embedded image of your email body? Or looks like text? Just try to copy some text on those email and see whether you able to copy and paste in some notepad?

  • Davidvarela Profile Picture
    10 on at


    Yes, Deenuji it's an image because when I try to copy it as text it doesn't allow me to, it tells me to copy it as an image. But the text of course does recognize it, there in the attached image you can see the selected text but the image does not, it sends me the message to copy image.

    Captura2.png
  • Davidvarela Profile Picture
    10 on at

    Hi Deenuji, ,I'm attaching the flow I have designed and the filter I applied to the email in the pad action.

    flujo.png
    captura3.png
  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Davidvarela 

     

    My email looks like this:

    Deenuji_2-1717433690397.png

     

    Build your flow something like this:

     

    • Begin your flow by using the Outlook launch action.

    • Retrieve email messages from Outlook, specifying filter details such as subject, body, sender, or recipient. Enable save the attachments option (where it will help us to save including embedded images), to your local drive.

    Deenuji_1-1717433407559.png

     

    • After both actions are executed, you'll find the images from the email in the designated folder.

    Deenuji_0-1717433595070.png

     

    • Utilize a for-each loop to iterate through all the images in the specified folder. Apply the "Extract text with OCR" action to extract text from the images by providing the full path name of each image.

    Deenuji_1-1717433622408.png

     

     

    • If you need to extract specific numbers or text, employ the "Parse text" action and utilize a regex pattern for extraction(of course use chatgpt to build regex pattern).

     

     

    Deenuji_0-1717433137675.png

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

     

     

  • Davidvarela Profile Picture
    10 on at

    Great solution Deenuji and thank you very much, when I download the images, not only download what I need, it also downloads other images that come inside the mail.

    captura4.png
  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Davidvarela 

     

    Understood. Are all your images in the same extension, or do they have different extension formats? Please confirm.

     

     

  • Davidvarela Profile Picture
    10 on at

    Good Morning Deenuji, all the images have the same extension png.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard