cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jokanol1
Frequent Visitor

Convert Image to Base64 in Power Automate

I have a Power Automate action that requires an image in base64. Is there a way to convert a given image to base64 using Flow via an action or Expression builder?

1 ACCEPTED SOLUTION

Accepted Solutions
CFernandes
Super User
Super User

Hey Mate @jokanol1 

 

You can use the Expression - base64(<your file content>)

 

CFernandes_0-1636051239053.png

 

If you are getting content from a SharePoint the you direct convert it  - using the formula -

 

 

CFernandes_0-1636051656266.png

 

outputs('Get_file_content_using_path')?['body']?['$content'] 
 
CFernandes_1-1636051702024.png

 

 

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/#:~:text=To%20use%20an%20expression...

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

View solution in original post

4 REPLIES 4
CFernandes
Super User
Super User

Hey Mate @jokanol1 

 

You can use the Expression - base64(<your file content>)

 

CFernandes_0-1636051239053.png

 

If you are getting content from a SharePoint the you direct convert it  - using the formula -

 

 

CFernandes_0-1636051656266.png

 

outputs('Get_file_content_using_path')?['body']?['$content'] 
 
CFernandes_1-1636051702024.png

 

 

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/#:~:text=To%20use%20an%20expression...

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

jokanol1
Frequent Visitor

It worked, thanks!

@jokanol1 I am glad that your problem is resolved.😊

Hi 

there is any way to know the size image ?? 

I mean to avoid failed action if the size is more than 28Kb

 there is any expression use it on condition if size more than 28 don't use it 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,902)