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?
I know this has been a while, but wanted to respond in case you needed it. The contentBytes is indeed the base64 for your image. i.e. to view it you could enter it as a data URI for an image as data URI with the format data:[contentType]/[format];base64,{contentBytes} so for your png image:
"data:image/png;base64,{contentBytes}"
Hello,
I have same issue but my image is from PowerApps
I try same function but i alwayse get data like below
If you have any idea how to get "contentBytes" ??
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
It worked, thanks!
Hey Mate @jokanol1
You can use the Expression - base64(<your file content>)
If you are getting content from a SharePoint the you direct convert it - using the formula -
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.
WarrenBelz
146,751
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional