Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

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

(1) ShareShare
ReportReport
Posted on 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
    10,558 Super User 2025 Season 1 on at
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,948 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow