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 / converting html image ...
Power Automate
Answered

converting html image to JSON

(0) ShareShare
ReportReport
Posted on by 204

Hello, 

 

Soooo I am using a 3rd party connector(Generate Word Document)- for this connector you write out a Word document template in JSON and then it uses the datamap to input your content. It is working ALMOST perfectly except for that the connector does not yet have a way of adjusting size for images. So all of my images appear in the word document quite large. I have tried formatting in Word, as well as using the picture content control but none of those work. 

 

Thought: I know I have previously re-sized an image for an email using html (ex: <img src="https://Test/image.png" width='108' height='76' />

 

Would there be a way to take that data output, get the binary data and convert it to Base64 JSON? My apologies if that is a silly question.

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @TorreyFalconer 

     

    Try expression

     

    base64(body('Get_file_content')) 

     

    Replace body('Get_file_content') with dynamic binary data mapping.

     

    Thanks

  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @TorreyFalconer,

     

    There is no need to convert the content into base64, you could use HTTP request to get the image content, then concat() function to mix the content with the head, then put it into the email, for example:

    Annotation 2020-03-17 130158.png 

    concat('data&colon;image/jpeg;base64,',body('HTTP')?['$content'])

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard