web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : rrQna1vZS3PYT1HMombOQ8
Power Automate - Using Flows
Unanswered

Embed an image into email body using Send Email (V2) for Gmail

Like (1) ShareShare
ReportReport
Posted on 3 Apr 2024 17:35:12 by 2

Hello Everbody,

 

The other day i was trying to embed an image into the body of an email utilizing Send Email (V2) for Gmail when building a flow. I went through a lot of videos regarding this, and none of them covered this particular aspect. So, I wanted to share how I did it in case somebody is trying to achieve the same.

Gmail does not support the Base64 Data type, so utilizing Compose + DataUri would not work for this case. (I'm mentioning this specifically since I saw a lot of videos showing this method.) However, Gmail does allow embedding an image from a web server. Thus, we would be hosting our image. It's important to note that the URL should be a direct link to the image. For this, I found out that sites like Imgur or PostImage work well since you can achieve this for free. (Direct Link Example: https://i.imgur.com/sjdhauisyfg.jpg)

Now, for the flow. In this example, I utilized a scheduled cloud flow since I wanted my emails to be sent out without me needing to manually trigger the flow. Next, we are going to utilize Compose. In the parameters, we are going to write this code snippet in HTML:

 

<p>
<img src="Replace Your link to your image" alt="Image">
</p>


For the final step, we are going to add Send Email (V2) for Gmail. In the body of the email, we are going to click on "Enter data from previous step" where we will choose our Compose output. Then, save and test. With this, we will be able to embed an image into our email.

Hope this be helpful for somebody.

  • David_MA Profile Picture
    11,841 Super User 2025 Season 2 on 05 Apr 2024 at 15:19:37
    Re: Embed an image into email body using Send Email (V2) for Gmail
    1. Store your image in OneDrive for business and then use the Get file content action to retrieve the image.
    2. Then initialize a string variable in your flow. You can give it whatever name you want.
    3. Set the value of the variable to: <img src="data:@{body('Get_file_content')['$content-type']};base64,@{body('Get_file_content')['$content']}" alt="Image" width="281" height="28" /></a>
    4. Adjust the alt, width and height as needed. Dimensions are in pixels.
    5. Then put the variable in your e-mail where you want the image to appear. I usually put the e-mail into HTML mode to do this, but you can try it without doing that. If it shows the HTML code, then you will need to put the e-mail action into HTML mode.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Featured topics

Restore a deleted flow
Loading complete