Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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!



  • Community Power Platform Member Profile Picture
    on at
    Re: Extracting a text value from an embedded string value (OCR via attachment)

    Sadly don't know how to do this here via json 😕

  • Nived_Nambiar Profile Picture
    17,497 Super User 2025 Season 1 on at
    Re: Extracting a text value from an embedded string value (OCR via attachment)

    Hi @Anonymous 

     

    The logic i would suggest is to utilize the keys in json. First try to get all keys in json array using the approach below

    https://powerusers.microsoft.com/t5/General-Power-Automate/Getting-JSON-keys-in-flow/td-p/99743

     

    Once u get the keys u know that that key (in your case  2163) will be always at fixed position, so use the index to find that key and then once key is found, use it in json to get the value 🙂

     

    Hope this helps !

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Extracting a text value from an embedded string value (OCR via attachment)

    Thanks @Nived_Nambiar but the value '2163' will keep on changing. How we can extract it without any key?

  • Nived_Nambiar Profile Picture
    17,497 Super User 2025 Season 1 on at
    Re: Extracting a text value from an embedded string value (OCR via attachment)

    Hi @Anonymous 

     

    see this

     

    Nived_Nambiar_0-1683082337522.png

     

     

    Hope it helps 

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Extracting a text value from an embedded string value (OCR via attachment)

    Hi @Nived_Nambiar Can you pls explain with an example in the above case for any one value?

  • Nived_Nambiar Profile Picture
    17,497 Super User 2025 Season 1 on at
    Re: Extracting a text value from an embedded string value (OCR via attachment)

    Hi @Anonymous 

     

    if the value is dynamic, if you know that value from flow , then u can store that in variable and pass that variable in key in json for getting value 🙂

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Extracting a text value from an embedded string value (OCR via attachment)

    Hi @Nived_Nambiar  what if the value '2603' is dynamic?. Meaning it is changing every time. Then can I simply use index?

  • Nived_Nambiar Profile Picture
    17,497 Super User 2025 Season 1 on at
    Re: Extracting a text value from an embedded string value (OCR via attachment)

    Hi @Anonymous 

     

    Have your parsed the json before using select action ?

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Extracting a text value from an embedded string value (OCR via attachment)

    hi @Nived_Nambiar Thanks for the input. 
    But it's giving the following error:

    vaampeere_0-1682867944243.png

     

  • Nived_Nambiar Profile Picture
    17,497 Super User 2025 Season 1 on at
    Re: Extracting a text value from an embedded string value (OCR via attachment)

    Hi @Anonymous 

     

    If you know the index where the element is placed, then use index approach and specify the key (number in this case) to get the value 

     

    for example: if the element is at index 4 in the array, for the number 2603, then use the below operation to retrive value corresponding to 2603

    variables('array')?[4]?['2603']

    where array is variable name for array used in flow.

     

    Hope this helps 🙂

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,962 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow