Skip to main content

Notifications

Power Automate - General Discussion
Answered

Azure form recognizer output to get invoice line items

(0) ShareShare
ReportReport
Posted on by 10

Hi All,

I am sending some invoices in pdf format to azure form recognizer from power automate. I am getting the JSON output that is way complex.

I want to get all the line item details such as the description,amount, quantity, unit price etc  from the JSON output but so far i am able to get only the first line item.

 

Please help me out in this. 

I am using the parse json object and after that in the select action i am using this expression (

item()?['fields']?['items']?['valueArray'][0]['valueObject']['Description']['content']

)

as this code returns only the first item description is there a way to get all the available descriptions in the available JSON

 

I am attaching the JSON output in here so you can check.

  • v-jefferni Profile Picture
    v-jefferni on at
    Re: Azure form recognizer output to get invoice line items

    Hi @Ratnesh_Chitko ,

     

    I just initialized a sting variable to hold the JSON of yours and use these two actions to parse and get values.

    vjefferni_0-1699236256908.png

     

    Best regards,

  • Ratnesh_Chitko Profile Picture
    Ratnesh_Chitko 10 on at
    Re: Azure form recognizer output to get invoice line items

    Hi @v-jefferni ,

    Can you please post the whole flow so i can uinderstand it completely

  • Verified answer
    v-jefferni Profile Picture
    v-jefferni on at
    Re: Azure form recognizer output to get invoice line items

    Hi @Ratnesh_Chitko ,

     

    I managed to parse the JSON and get what you need, please refer to below screenshots:

    vjefferni_0-1699005182138.png

     

    Result:

    vjefferni_1-1699005228479.png

     

    expression for From of Select:

    json(YourJsonString)['analyzeResult']['documents'][0]['fields']['items']['valueArray']

    field values in Select:

    @item()['valueObject']['description']['content']
    @item()['valueObject']['amount']['content']
    @item()['valueObject']['quantity']['content']

    etc.

     

    Best regards,

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,526

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard