How to embed an image in an email in Power Automate

A warm welcome to all my blog readers. I am back with another blog on Power Automate. And today I am going to show you on how to embed an image in email body when we send an email using Power Automate.

For this demo I will use an image stored in OneDrive for Business. However if your requirement is to get the image content from SharePoint column or SharePoint attachments, you can check this link. The remaining part described here will be the same.

I have the following image uploaded in my one-drive for business. I want to embed it in an email which I am going to send through Power Automate.

For the demo, I created a workflow with a manual trigger. The first action that I use is the ‘Get file content‘ action of the One Drive for business connector.

If you want to get the same content from a SharePoint list column, you can check this link.

Before I perform any further step, I run the flow to see the output of the action.

Quite obvious, it’s the $content property which gets me excited. Let’s see how we can use this content property to show the embedded image.

Now comes the most important step which is sending the email. I will start with the most popular way of sending email which is using the Office 365 outlook connector.

To embed the image, navigate to the code view.

In the code view, I use the HTML img tag to render the image in the below format.

Check out for the expression

body('Get_file_content').$content

where ‘Get_file_content’ is the name of the action to get the content from one drive.

So far so good. I save the flow and run it. And below is a snapshot of the email I received in my inbox.

Wonderful isn’t it. Now let’s try with the other popular action which is frequently used to send out emails – “Send an email notification” action.

Here also you have the code view where you can use the HTML code we constructed previously to send the email.

Hope this helped. You will also like the below posts.

Debajit Dutta
Business Solutions MVP


Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe to get the latest posts sent to your email.

2 thoughts on “How to embed an image in an email in Power Automate”

  1. Is there a way of getting images from a SharePoint enhanced rich test column and send the contents in an email? When I try to use that type of column in a V2 or V3 version of the Send Email in Flow, it doesn’t work. Flow removes the domain portion of the path to the image and replaces all “/” with “\” making it look to the user like the image file is on their desktop which causes an error. Same thing happens with embedded hyperlinks in a rich text column.

    1. Debajit Dutta (Business Solutions MVP)

      Hi Pamela,
      Thanks for reading my post. I need to check this and get back to you.

      Thanks
      Debajit Dutta

Comments are closed.

Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading