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

Community site session details

Session Id :
Power Apps - AI Builder
Answered

AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

(0) ShareShare
ReportReport
Posted on by 13

I've been trying to create a PowerApp to process forms and take specific data fields from them. I am using a flow to find the form on Box.com and insert the PDF file into my PowerApp. I also have an AI setup to extract this data but it requires the user to find the file on the computer before scanning the document. 

 

Is it possible to link the file found on Box.com by the flow to be automatically run through the Form Processing AI on my app?

 

Thanks

Categories:
I have the same question (0)
  • JoeF-MSFT Profile Picture
    on at
    Re: AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

    Hi @sbeattie,

     

    What you can also do is execute form processing in Flow, store the extracted fields in a datastore like CDS and retreive these extracted data in a PowerApp. https://docs.microsoft.com/en-us/ai-builder/form-processing-model-in-flow

    Would this work for your scenario?

  • sbeattie Profile Picture
    13 on at
    Re: AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

    Thanks for the quick reply @JoeF-MSFT , I had previously seen the option to put the AI into a flow but was unable to find the Predict connector for processing the documents in the list of actions on Flow, as mentioned in the webpage you linked? 

  • JoeF-MSFT Profile Picture
    on at
    Re: AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

    Hi @sbeattie,

     

    To see the predict action, you will need to create the Flow inside a solution. More info on how to do this here: https://docs.microsoft.com/en-us/flow/create-flow-solution

  • sbeattie Profile Picture
    13 on at
    Re: AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

    Great, this seems to be on the right track @JoeF-MSFT . What would the code be for passing the document into the form processor from Box.com? In the attached photo I swapped "string(triggerBody()?['file']?['contentBytes'])" for the link to the Box.com file extracted in the step above, this gave me an error?

     

     

     

  • JoeF-MSFT Profile Picture
    on at
    Re: AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

    Hi @sbeattie,

     

    Good to see the progress! Try using the following expression: 

    string(outputs('Get_file_content_using_path')?['body']) as shown on the following screenshot.
     
    2019-10-17_19-20-59.png
  • sbeattie Profile Picture
    13 on at
    Re: AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

    @JoeF-MSFTUnfortunately I am still getting an error where the file is passeed to the Prediction action. This is the error message I received. I tried changiny "body" to "File_Content" but this still gave an error. 

     

    "After parsing a value an unexpected character was encountered:  Path 'base64Encoded', line 19, position 44"
  • Verified answer
    JoeF-MSFT Profile Picture
    on at
    Re: AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

    Hi @sbeattie,

     

    Can you try with the following expression? base64(outputs('Get_file_content_using_path')?['body'])

     

     

  • sbeattie Profile Picture
    13 on at
    Re: AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

    Briliant, that's got the flow working @JoeF-MSFT . Within the PowerApp, when I try to add the flow to a button I get an error Failed during http send request? 

  • JoeF-MSFT Profile Picture
    on at
    Re: AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

    We're almost there @sbeattie🙂

     

    Are you calling the Flow from PowerApps like this, where in Flow you have a PowerApps trigger? https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/using-logic-flows

  • sbeattie Profile Picture
    13 on at
    Re: AI Form Processor - Automatically Insert PDF File from Flow in PowerApp

    Yes @JoeF-MSFT , when I go to select the Flow to assign to a button within the PowerApp it displays an error. "Failed during http send request"

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 624 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 384 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 246

Last 30 days Overall leaderboard