Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - AI Builder
Answered

How to run AI model using file attached in Power Apps

(2) ShareShare
ReportReport
Posted on by 65

HI,

My use case is to run an AI model in Power automate flow. However the user needs to add the PDF sample file (on which AI model needs to work) in power apps.

 

Power Apps:

Expression to run Button: 'PowerAppV2->Compose'.Run('Sample Text'.Text,First(Sample.Attachments))

 

svivek_1-1662882568639.png

 

Power Automate V2 trigger where Sample File Will be uploaded from Power Apps. This Sample file will be fed in an AI extractor for extracting data.

 

svivek_0-1662882383346.png

 

However I am getting following error. Pls help how to solve this issue. 

 

{"operationStatus":"Error","error":{"type":"Error","code":"InvalidPredictionInput","message":"The base 64 binary content is missing for input single","properties":{"BackendErrorCode":"InvalidInferenceInput","DependencyHttpStatusCode":"400"},"innerErrors":[{"scope":"Record","target":"single","code":"InvalidRecord","type":"Error","properties":{"MlIssueCode":"InvalidRecord","MlIssueTarget":"single"}}]}}

 

 

  • Verified answer
    v-jefferni Profile Picture
    on at
    Re: How to run AI model using file attached in Power Apps

    Hi @svivek ,

     

    Would you like to upload PDF files in PowerApps and then using AI Builder in a Flow to extract information? If so, please flow the steps of the solution in below thread:

    Solved: Using Attachment Control to upload to Document Lib... - Power Platform Community (microsoft.com)

     

    In short words, within your Canvas App, using a JSON function to include the file data and pass to the flow, then get the file content use json and dataUriToBinary functions in the flow. Note that it's using PowerApps than PowerAppsV2 trigger in the flow.

     

    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - AI Builder

#1
mmbr1606 Profile Picture

mmbr1606 2 Super User 2025 Season 1

Overall leaderboard