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 / Using attachment image...
Power Automate
Unanswered

Using attachment image inline in Send an email (V2) body

(2) ShareShare
ReportReport
Posted on by 127
In my flow I've used a Compose to store the base64 string of an image.
 
In my Send an email (V2) I've setup an attachment:
 
[
  {
    "Name": "logo.png",
    "ContentBytes": @{base64ToBinary(outputs('Compose_-_Email_Logo_Base64'))}
  }
]
 
then in my body I've done
 
<img src="cid:logo.png" width="247" height="198" alt="Logo">
 
 
when I send the e-mail, the attachment is there, yet in the body all I get is a square with a red x stating "The linked image cannot be displayed.  The file may have been moved, renamed, or deleted.  Verify that the link points to the correct file and location.".
 
I've tried all sorts of variations which included things like adding
 
"IsInline": true,
"ContentId": "logo.png",
"ContentType": "image/png",
 
The only way I've been able to get it to work is to use an image hosted on a website and use that for the imge src (https://....)
 
Can anyone help me correct the <img > syntax to get this working with the compose base64 string to embed it directly in the message body.  Since Outlook desktop doesn't support base64 images directly, I'm simply trying to find a way to replicate what I've long done in VBA which is to use the cid: approach, but can't find a way to do so in Flow.
 
Thank you.
Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at
     
    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!
     

    Does this answer your question? Check the box :-)
     

     
     
    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
  • DanielPineault Profile Picture
    127 on at
    Thank you for trying to help, but those examples rely on using a Sharepoint library which is not my case.  Even if we ignore that, following the cid approach doesn't work in my context.
     
    What I also notice is that even though I explicitly define
     
    <img src='cid:logo.png'>
     
    in the e-mail the source shows
     
    <img data-outlook-trace="F:0|T:1" src="cid:419B869964E99B42954EA545012633FF@namprd13.prod.outlook.com">
     
    ???
     
    Why is Flow changing my HTML?
     
    I'm always amazes how complicated certain things are made to be in Flow.  I'm already in 10-12 hrs of trying this and that, searching all over the place.  This is a common need, nothing exceptional whatsoever, I've been doing things like this for years in a multitude of languages, yet it can't be done in Flow.
  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at
    @DanielPineault Sorry for the delay...
     
    My best would be to use 
    <img src='@{dataUri(body('Get_file_content_using_path:_Embed_Image'))}' />
    I had that problem once, I switch to the classic UI, changed the email body to honor HTML and then inserted the snippet...
     
     
    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!
     

    Does this answer your question? Check the box :-)
     

     
     
    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

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