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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trying to build a flow...
Power Automate
Suggested Answer

Trying to build a flow that can process images by extracting multiple specific words

(1) ShareShare
ReportReport
Posted on by 8
I am working on a flow for work, and other than having no experience working in Power Automate, I am struggling at every possible step. I am using the action 'Recognize text in an image' from the AI Builder actions, trying to extract the words from an image of a label. I am using the 'Full text of the document' output from the OCR action, which returns a string, but when I try to pull any more information from there, I am being told to convert to an array, to more easily process the text. I am then running into the problem of having an array that is just one line of a long string with line breaks "\n", which means that I am only processing the whole array or the string within the array. My ultimate goal is to be able to directly take an image, extract the whole text, process it to look for specific criteria, such as the first word in all capital letters that is more than 2 letters long, a number that follows the format xxx.xxx.xx, and a number that follows the format X(Y), and take these outputs and enter them into a row in an excel table. I am using a work account, so I do not have direct access to Automate for Desktop, or all of the capabilities of Automate. I am wondering if it would just be easier to switch over to creating a process from scratch in Python or some other script. 
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi 
     
    Would it be possible to share a sample long text from which you are planning to extract the data ?- as i think extraction stage using ai builder is quite straighforward.
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • DC-06021641-0 Profile Picture
    8 on at
  • DC-06021641-0 Profile Picture
    8 on at
    I just posted the photos for my flow. I am already using AI Builder, but I could be using something wrong.
  • DC-06021641-0 Profile Picture
    8 on at
    Here is a sample of what I am trying to extract from.
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    Instead of the image - can you share how the string looks in power automate after extracting from the image ?
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • DC-06021641-0 Profile Picture
    8 on at
    Here is the output of the ExtractedText Compose action.
    "KRITTER\n70×160 cm\n9 kg\n(19 lbs)\nMade in Poland\n21976\n(27 1/2×63\")\n801.251.24\n1(2)\nIKEA®\nPI-123747-2\nIKEA of Sweden AB\nDesign and Quality\n@ Inter IKEA Systems B.V. 2019\nSE - 34381 Älmhult\nIKEA of Sweden"
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    Try like below
     
    1. To extract the first word which is all capital and is having more than 2 characters long - try this approach 
     
    1.1 - use compose action to store the word extracted
     
    1.2 - use filter array action tofilter out the word whose all words are capital and is 2 characters long
    Filter condition used - @and(equals(trim(item()), toUpper(trim(item()))),greater(length(trim(item())),2))
     
    1.3 Use this expression to capture the result out of filter array's output
     
     
    2. To capture number of format - xxx.xxx.xx - use the following 
    For this, you need to write an office script which helps to extract word from input string using regex. for writing the office script - refer the blog - https://andersjensen.org/how-to-use-regex-in-power-automate/
     
    2.1 Use Run script action to run the office script by passing required input string and regex pattern and flags as shown below
    Pattern used is \d{3}\.\d{3}\.\d{2} and flag used is gm
     
    2.2 use compose action to get the run script's output 
    Expression used - 
    first(outputs('Run_script')?['body/result'])
     
     
    3. to capture number of format - X(Y) use the below approach
     
    3.1 - use the run script action to run the office script used in above step, with following input parameters 
     
     
    Pattern used is \d+\(\d+\) and flags is gm
     
    Hope it helps !
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard