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 Automate / Send image file to Run...
Power Automate
Unanswered

Send image file to Run a Prompt

(0) ShareShare
ReportReport
Posted on by 2,297
Hello,
 
Can someone please explain me what "Run a Prompt" action expects as a file input?
 
I've got the prompt tested and working using the template "Reads Receipt". The file is a JPG image of a receipt.
The same image file is used both for testing the prompt and the running the flow.
 
In the flow, the file is obtained from a MS Forms response.
The file structure is:
  • An array variable, like:
    {
      "name": variables('Anexos')?['Name'],
      "contentBytes": variables('Anexos')?['ContentBytes']?['$content']
    }
  • Onlyt the contenBytes part of the array (base64 encoded or not)
  • Or, the path to the OneDrive location of the file using "Get file content using path"
I've searched for a solution here:
But NO GO.
 
Of the around 600 failed runs I've had so far for this, I get the error:
 
{"operationStatus":"Error","error":{"type":"Error","code":"InvalidPredictionInput","message":"{\"code\":\"BadRequest\",\"message\":\"Invalid image data.\",\"type\":\"\",\"param\":\"\",\"status\":0,\"innererror\":{\"code\":\"\",\"content_filter_result\":{}}}","properties":{"BackendErrorCode":"InvalidInferenceInput","DependencyHttpStatusCode":"400"},"innerErrors":[{"scope":"Generic","target":null,"code":"InvalidImage","type":"Error","properties":{"MlIssueCode":"InvalidImage"}}]},"predictionId":null}
 
All I'm trying to do is to is to Run the Prompt in Power Automate. The most basic POC one could think of.
 
And this is absolutely a waste of time, that could be done so much easier, faster, cheaper with Python, but who knows the insanities upon Power Automate has been built?
 
Masters, oh Masters, please enlighten me, so I can tell my client Power Automate is so cool and try to enjoy the rest of my life.
 
THANK YOU!
 
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,456 Most Valuable Professional on at
    Try one thing. Instead of using an array variable just use an object variable.  My blog post is about sending one or more files from an MS form as attachments in an email. But when doing run a prompt its expecting just one document.  So it should be an object, not an array of objects.  The code would be the same except for the object type and that you only use one file coming back from the MS form.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • WebPortal Profile Picture
    2,297 on at
    @Pstork1
     
    I think I have made it with the array variable.
    It seems the "Run a prompt" action requires the binary format for the image to work, who could tell?

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard