web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Access $content from p...
Power Automate
Unanswered

Access $content from previous step in next step? (convert application/octet stream to image/png)

(0) ShareShare
ReportReport
Posted on by 55

Hi,

I have a canvas app that triggers a flow that populates a word document. This document must include a certain image. At first I used the json function in powerapps to create a base64 string and use that in my flow and while this kind of works, it is very unreliable as powerapps often doesn't wait for the string to generate before triggering the flow.

 

So I changed my flow to include "download a image or file". This part works and I can see in the output there is a base64 string in $content that represents my image.

 

{
"$content-type": "application/octet-stream",
"$content": "iVBORw0KG....."
}

 

The problem is that the type is application/octet-stream which doesn't seem to be supported by anything inside power automate so I need to convert it.

I know I need to convert it to "$content-type": "image/png" but how can I access the string inside $content? I tried various things such as json converter, compose (which for whatever reason always only shows input and never output...) etc.

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    You can use the following expressions to access the two JSON properties:

    variables('img')?['$content-type']
    variables('img')?['$content']
     
    ekarim2020_2-1630699925067.png

    The Outputs:

    ekarim2020_3-1630699964634.png

    Ellis

     

     

     

    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.


     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard