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 / Convert image to base6...
Power Automate
Unanswered

Convert image to base64 and pass it as a variable in POST Request

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm converting image to base 64 stored in sharepoint using the formula :

 

vBase64Content= outputs('Get_file_content')?['body']?['$content'] 

 

Then passing the binary value of image in an POST Request as:

 

"type": "image_url",

"image_url": {

"url": "data;image/jpeg;base64,&vBase64Content&",

"detail": "high"}

 

Error:Bad Request 

Status code - 400

"Invalid base64 image_url."

 

When I'm checking the value of image it shows correct but still it is not running .

Let me know what is the issue.

 

Thanks,

Adi

 

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi Adi,

     

    You could refer below sample:

    ManishSolanki_0-1704691672014.png

    Expression used for adding base64 content in compose action:

    body('Get_file_content_using_path')?['$content']

    You could pass the output of compose action in the body of http action.

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

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 Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard