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 Apps / How to run AI model us...
Power Apps
Unanswered

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
    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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard