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 / Can not embed image in...
Power Automate
Unanswered

Can not embed image in a email

(1) ShareShare
ReportReport
Posted on by 6

HI,

 

I'm trying to send an email with an embedded image that i get from sharepoint library. The problem is that i tried embed it using CID and base64 code and it's not working:

 

USING CID:

 

I made the next configuration in the Send Mail action:

EmbedCID.PNG

When i use aditional parameters in Attachments section(because i need the ContenID), it gave an error(i tried many combinations of parameters). And when i left only two parameters (Name and ContentBytes) it sent correctly the attachment but it not show embedded (because i can not define the ContentID). I tried using the same name of the file as CID, but it did not work.

 

USING base64

 

When i tried using a base64 string from the image (as shown below):CapturaBASE64.PNG

Using the next Expression:

body('Get_file_content_using_path')?['$content']

 

When i viewed the execution it shows everything fine:

Capturabase64results.PNG

 

But in the email in the inbox is removed the base64 code and it's not showing nothing:Capturabase64emoved.PNG

 

Please can you help me to solve the problem.?

 

Thanks in advance.

 

 

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

    Hi @Jeshagio,

     

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

    Do mean to embed Image into Email Body?

     

    The Community Support Team 

     

     

  • Jeshagio Profile Picture
    6 on at

    Hi  @v-xida-msft, thanks for your reply. The configuration of the flow is the next:Config

     

    As you see in the flow i get the image from a sharepoint library an embed it using 64basecode string in the body of the email:

     

    I read the post you mentioned (from v-micsh-msft), when i tested using small picture (2KB) like in the example, it worked(as i show below):

    red dot

    The 64basecode string it's ok:

    red dot code

     

    But when i tried with a bigger picture (46KB), it did not work. The flow execution showed the base64code of the image:

    wrong execution

    But when the emal arrived the 64basecode of the image is not there (as i show in the image below), the img tag it's empty, like if it was removed::

     

    email empty

     

    I think the problem it's with the flow or maybe the Exchange server, because with an small image it´s working

     

    Hope your comments.

  • johnguilbert197 Profile Picture
    36 on at

    I'm having same issue. Base64 and any expressions I use get removed. Must be a bug or Microsoft restriction.

  • brhoan Profile Picture
    on at

    Are there any updates?

  • Murderbot Profile Picture
    132 on at

    According to this thread, the ability to embed images in the way you describe has been removed. 😞

  • Community Power Platform Member Profile Picture
    on at

    This is crazy. Can we please get a non-hack, standardized method for insertingimages to Email Body in Flow? Unless I'm missing a new standard, this has been a longstanding issue.

     

    Use cases waiting on this functionality:

    - Add images from a Sharepoint Image library to an HTML email body

    - Add images from an Azure Maps API call to an HTML email body

  • Jcalann Profile Picture
    29 on at
    Hello everyone little late to this forum but it definitely help me. This is for anyone who is still having this issue and their images are hosted in a Sharepoint folder/image library. Under the standard connectors for Sharepoint you can select the "File Content by Path" and grab the image either jpeg or png haven't tested svg. In your email body under "Attachment Content" select add dynamic content and you're going to select "File Content". In the attachment name type the ImageName.jpg or png. The imageName can be anything you set. After that in the image body make sure html is set to yes and use the <img src="ImageName"/> the image src must be the same name as the attachment name. Also the user might need to mark the domain as a safe sender. I did this and the image displayed in Outlook Client 2016 and Office 365 Outlook. Hope this helps
  • Community Power Platform Member Profile Picture
    on at

    Hi all, as @Jcalann said, this is overdue but might help future searchers. At the time of writing, two ways of embedding work: as attachment (see above message), and as base64.

     

    For base64 you have to retrieve the content with Get file content using path, and paste this snippet in the email body (html):

     

    <img border='0' src='data&colon;image/png;base64,@{body('Get_file_content_using_path')?['$content']}' alt=”My Image”><br>

     

    The content can also be defined as a variable with body('Get_file_content_using_path')?['$content'] .

    Create a string variable and paste it in the value bar, or add it as an Expression in the following way:

    1. Type it as 'Expression'

    2. Select the 'Dynamic content' tab again. The text should remain there. Click on OK.Picture1.png

  • Community Power Platform Member Profile Picture
    on at

    @Jcalann Bravo!!! This works for me! BUT, there needs a tiny modification of the <img> part for me: I need to write the full image name like <img src="Image.jpeg" width="10" height="20">. Otherwise, the picture cannot be displayed. 

     

    Also, this "attachment" approch displays successfully for both "Outlook2016 desktop" and "Outlook Windows10 desktop". For me, base64 only works for Win10 version. 

     

    Hope my reply will help other ones still trapped in this 🙂 It took me almost 2 days to find the final general solution. 

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard