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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to run AI model us...
Power Apps
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"}}]}}

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard