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 / Form Recognizer from PA
Power Automate
Unanswered

Form Recognizer from PA

(0) ShareShare
ReportReport
Posted on by 16

Hi Everyone,

 

I have a requirement to extract data from 500 different invoice documents. I wanted to make use of the Invoice prebuilt model in the form recognizer. I'm trying to call the form recognizer from power automate. Here are my queries.

 

1. Is AI builder in PA cheaper than form recognizer for 500+ invoice pdf docs extraction? Will form recognizer be the better approach?

2. Can the prebuilt model be used without a Storage Account and blob container in the Azure portal?

3. How to pass the input file from PA when using a form recognizer connector?

 

 

@Brad_Groux  Kindly suggest

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,484 on at

    Hey @IshDoss 

     

    I have used form recognizer in Power Automate. So, I might be able to answer some of your questions.

    I have the answer for the 3rd question. 

    -> For me I had a scheduled trigger that would run everyday. Then I used to run list blobs, this would pick all the files from the blob storage. After that I used apply to each loop and sent the list I got from list blobs.

    Inside that loop, I used an action called Create SAS URI by path (V2).

    This would create a link for that file. This link we can use in an http request body to send to form recognizer. 

    By this way we can input files from PA To form recognizer. 

     

    Sundeep_Malik_0-1682492369576.png

     

    Inside HTTP Body:

    Sundeep_Malik_1-1682492392263.png

     

    I am not sure about the second question.

     

    For the 1st question, I am tagging AI Builder admins, they might be able to help.

     

    @JoeF-MSFT @plarrue 

     

     

    I hope this helps 🙂

  • IshDoss Profile Picture
    16 on at

    Thanks a lot for sharing, Sundeep! Is this for a custom model? My input PDFs are invoice documents, so the prebuilt model works fine. All the blogs have mentioned the need for a storage account and blob container for a custom model. Not sure if it is required for Prebuilt as well. Thanks for your input!

  • Sundeep_Malik Profile Picture
    6,484 on at

    @IshDoss 

    Yes mine is a custom model

  • IshDoss Profile Picture
    16 on at

    Thank you! Also, I'm trying to parse the lengthy JSON output (attached )that I received from the GET endpoint. Do you have any sample on how to get each field values string in an Excel sheet? I tried this way 

    body('Parse_JSON')?['analyzeResult']?['documents'][0]?['TotalDue']?['valueString']. But its returning null. I'm not sure how to pass the items and header values..

  • Sundeep_Malik Profile Picture
    6,484 on at

    @IshDoss 

    Nice work in deciphering the json data. My data was also really huge and I took a lot of time to decipher it. Hehe.

     

    You missed a field called: fields.

     

    Rest everything looks good in your expression. 

     

    So, an easy way to decipher the big json structure, use Notepad++. That will give you the exact brackets. So you will be easily able to know what is inside what. 

     

    For me I have done it in the following way(This technique I used 6 months back, there can be many alternatives to it):

     

    Saved the body in a object variable:

    Sundeep_Malik_0-1682529802665.png

    Took another variable and stored analyze result part in it:

    Sundeep_Malik_1-1682529846678.png

    Then used another object variable to store documents:

    Sundeep_Malik_2-1682529888259.png

     

    I know above actions can be used together in just a single variable, but this I did 6 months ago, now I will do it differently.

     

    Next I used select action for fields variable:

    Sundeep_Malik_3-1682529968423.png

     

    After that used a parse json action and passed above select action in it. 

    Sundeep_Malik_4-1682530115776.png

     

    Then you can use an apply to each action, pass the body of parse json in it and extract all the values.

     

    I hope this helps 🙂

     

  • IshDoss Profile Picture
    16 on at

    Wow. Thank you so much for sharing in detail! I've fixed it with your support!

  • IshDoss Profile Picture
    16 on at

    For the prebuilt model like Invoice, I tried like this and its working!

    IshDoss_0-1682679173160.png

     

  • IshDoss Profile Picture
    16 on at

    Sundeep,

     

    Are all your input files in the azure data lake? Could you share the complete sequence of the flow, if possible?

  • takolota1 Profile Picture
    4,974 Moderator on at

     

    So I built this template that processes any document just using the less expensive image recognition AI Builder service & GPT.

    It seems much less expensive with a much lower barrier to entry only requiring a premium Power Automate license with 5000 AI Builder credits per month & some on-going LLM / GPT costs…

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Extract-Data-From-PDFs-and-Images-With-GPT/td-p/2201345/page/4

     

    If I’m looking at this right, this method should cost 

    Image recognition +.0017

    GPT prompt & output +.007

    Flow actions +.00375

    So about $ .013 per page.

    Less expensive than any of the other microsoft document/receipt/invoice processing options. And several of those take about 30 seconds to run. 
    And the 5000 AI Builder credits that come with the now $15 premium Power Automate license is enough for 1500 Image recognition pages. So you could probably process 500-750 documents per month with just 1 premium Power Automate license.


    So it seems this method is faster, less expensive, easier to adjust, & requires less set-up than other standard AI builder set-ups.

    Once the GPT actions are in general availability, I don’t know why I’d use any of the other services. 🤷‍

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