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 / Extracting a text valu...
Power Automate
Answered

Extracting a text value from an embedded string value (OCR via attachment)

(0) ShareShare
ReportReport
Posted on by

Hi guys,

This would be my first post here and one issue has me scratching and pulling all nighters. Its addictive!..

Here are my pics.

I have an email attachment for a pdf which is first fed into a variable (string type)

vaampeere_0-1679928013646.png

Then conditioned.

vaampeere_1-1679928123878.png

and finally passed trough AI for image recognition. 

The value is then embedded into a string variable.

vaampeere_2-1679928205248.png



However now I simply need to get the Text value from here in the above [0] string. It is not an array so I cannot pass it though filter array function. Tried many alternatives with split() function and item()? type as well but of no use. 

From a total of 1200 lines I need to only filter those starting with "text:" values and then append them as an array into a sharepoint file. Just..that..simple 😕

Would be really grateful if some of the experts here can shed some light on to it. Eagerly awaiting your replies!



Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Anonymous 

     

    Once you got the output from AI as the output data for pdf file, 

     

    Next step you can parse the json string obtained to Parse json action.

     

    Next use the output from parse json and pass it to Select action, here specify value section as the output from parse json and select the highlighted option

    Nived_Nambiar_0-1679934535529.png

     

    Then after that in the same field specify item()?['text'] 

     

    Output from select action would array having only text values 🙂

     

    Hope it helps 🙂

    Mark it as solution if it resolves your query 🙂

  • Community Power Platform Member Profile Picture
    on at

    Hi @Nived_Nambiar  thank you for your reply. Would really appreciate if you can guide me on how to parse json in this case (a total newbie here unfortunately!)...Thanks a lot!

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Anonymous 

     

    Refer this video 

    https://youtu.be/e0dzMqoJGtY

     

    What you have to do is the output which you are getting in form of json you have to pass into Content Field 

    In schema section, click Generate from sample and then paste the same json structure which would generate schema from sample.

    Nived_Nambiar_0-1679972098219.png

     

    Hope it helps !

    Mark it as solution if this resolved your query

  • Community Power Platform Member Profile Picture
    on at

    Hi @Nived_Nambiar 

    How do I get a JSON output here that can be sent to JSON parser. (The one im sending as an input is generating null values)

    I have this as an out of the appended variable output

    vaampeere_1-1679973653584.png

    On expanding the output it gives all in row, which is not what is perhaps required in the schema for parsing json?

    vaampeere_2-1679973703668.png

     



    vaampeere_0-1679973550204.png

     

  • Community Power Platform Member Profile Picture
    on at

    as per the video, do I need to create another variable and place the previous appended string values of 'PDF_Content' into it before parsing?

  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    No, currently which dynamic content is giving the required value, place that in Content section of parse json, then if you have same json content with you [ may you can do a run and using compose function you can capture the json data] , you can generate schema from it 🙂

     

    Video is just giving an idea on how to work with that 🙂

  • Community Power Platform Member Profile Picture
    on at

    @Nived_Nambiar getting the below error here

    vaampeere_0-1679978187226.png

     

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Could you show me the flow (without running )?

  • Community Power Platform Member Profile Picture
    on at

    Here is the flow without running

    vaampeere_1-1679983142860.png

     

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Anonymous 

     

    See this 

     

    Nived_Nambiar_0-1679983477664.png

     

    Next to Recognize text in pdf or image document, place the parse json action, in the content, place the results instead of PDF_content.

     

    Also make sure schema matches that of result dynamic content 🙂

     

    Let me know if it works 🙂

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