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 / Attach an html file in...
Power Automate
Unanswered

Attach an html file in send an email with AttachementContent as image item in html

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a requirement where I want to send an email with an attachment. This attachment should be of html format and should have attachmentcontent(an image) as an image in html. This attachmentContent is output of previous Kusto query.

 

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    HI @swetaag2011,

     

    Could you please share a screenshot of your flow's configuration?

    Do you want to include the image into a html file and display it in the html file?

     

    If you want to include the image into a html file and display it in the html file, I have made a test on my side and please take a try with the following workaround:

    • Add a proper trigger, here I use Flow Button trigger.
    • Add a "Get file content" aciton, File field set to a specific image file.
    • Add a "Compose" action, Inputs set to following html data:20.JPG

      The formula within src property as below:

    • body('Get_file_content')?['$content']
      Add a "Send an email" action, Attachments Name field set to Test.html and Attachments Content field set to output of "Compose" action.

    Image reference:21.JPG

    The flow works successfully as below:22.JPG

     

    23.JPG

     

    The html file opens successfully as below:

    24.JPG

     

    Best regards,

    Kris

     

     

     

     

     

  • swetaag2011 Profile Picture
    Microsoft Employee on at

    Thanks for responding, This is very helpful, however my image file is a JPEG image which is the out put of previous step.

    This AttachmentContent is a JPEG file which I am trying to embed, but this is not working.

    Attaches screenshot:image.png

     

     

  • swetaag2011 Profile Picture
    Microsoft Employee on at

    Thanks a lot for the pointers, I solved the problem by directly consuming AttachmentContent in my compose "Body" formula and it works.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have a similar problem and tried your thing.

     

    But there is a fault at my flow: The response is not a JSON format?

     

    MarvinBier_0-1594836292970.png

     

    MarvinBier_1-1594836318055.png

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 581

#3
Haque Profile Picture

Haque 545

Last 30 days Overall leaderboard