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 / Images converted to st...
Power Automate
Answered

Images converted to string when using Parse JSON

(1) ShareShare
ReportReport
Posted on by 20

Dear friends,

First of all, many thanks for all of the PowerApps/Flow tutorials and debugs you guys do everyday! Those help A LOT!

I have a specific situation here that stops me from continuing my project and I've been stuck for the last several days.

Basically, I want to export a collection (that contains strings, booleans and images(out of a pen input)) from Apps to Flow and then put that collection into a parsed html code and then convert that to a pdf file. I followed videos for that specific case, but as the logic and the elements requiered in my project are more complex that just the table, I need to do the operations in Flow, rather than generating the final html in a PowerApps hidden screen.

I tried two things:

First, I used the JSON function and everything worked perfectly well except for the part where my images are sent as a type:image/png but are converted in the Flow JSON Parse function into a type:text/plain . This means that I lose completely my images and don't know how to deal with this. I specified the JSONformat.IncludeBinaryData and I respected everything said in the PowerApps JSON tutorials on the web.... Any suggestions?

Here is the proof my Collection's JSON is send with binaries, where SIGNATURE is indeed an image type (sorry it's in French :X 😞
Capture.PNG

Here's the part where I convert that to URI:
Capture1.PNG

And here's the proof the type is changed to text into the html file created with Flow:
Capture2.PNG

Now, it is important to know that I input the Collection data into an initialised string variable. And then, when I create the JSON parsing model by pasting the JSON(Collection, JSONFormat.IncludeBinaryData) output, the class SIGNATURE is recognised as a string type, not image. When I change that to image, an error occurs saying that's not the correct type..

EDIT:
Well it seems that by opening the .html file with VS Code, the types are said to be text/plain. However, when opened in Mozilla-> left click on image -> show image , we can see that the element is indeed a data:text/plain type but stores the original data:image/png information. Gosh I feel so close to the solution...

Capture3.PNG


Thank you very much!

Categories:
  • Verified answer
    Jay-Encodian Profile Picture
    2,922 on at

    Hi @MetodioTrend 

    Looking at your screen shots... the 'SIGNATURE' field in your JSON is already in the correct format, so therefor you don't need to pass it back through the dataUri epxression.

     

    2019-10-22_20-13-49.png

     

    The reason it's coming out as a string is because you are passing it a string .

     

    Cheers J

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard