- Home
- Guides
- Power Automate
- How to send HTML emails with embedded images from Power Automate
How to send HTML emails with embedded images from Power Automate
Store your HTML email, including image tags and CSS, in a string variable and use it as the body of the Send an email (V2) action, so recipients get the fully formatted email with images.
Jump to a step (5)
Pasting HTML straight into the Power Automate email body strips out most tags, so newsletters, announcements and branded emails arrive plain or broken. Images you want in the body do not show up the way you designed them.
The fix is simple: put the full HTML in an Initialize variable action of type String, then insert that variable as the body of the Office 365 Outlook Send an email (V2) action. Everything in your HTML, including styles and images, arrives as designed.
Images are embedded with an <img> tag that points to a publicly accessible image URL. The video uses one image from the channel and one from Pixabay. It uses only standard actions, so no premium connectors are needed.
What you need
- Microsoft 365 with Power Automate and Outlook
- Your email written in HTML (you can preview it in any online HTML editor)
- Images hosted at public URLs that anyone can open
Step by step
0 of 5 done-
01
Prepare and preview your HTML
Write the email as HTML and preview it in an HTML editor so you know how it will look. Style the text with CSS as you like.
For each image, use an
<img>tag with the image address insrc, and setwidthandheightto control the size, for example<img src="IMAGE_URL" width="600" height="300">. To make an image clickable, wrap it in a link:<a href="PAGE_URL"><img src="IMAGE_URL"></a>. -
02
Copy a public image URL
Open the image in your browser, right-click it and choose Copy image link (or Copy image address). Paste that into
src. The image must be publicly available and not behind a login, or it will not load in the recipient's inbox. -
03
Store the HTML in a variable
In your flow, add Initialize variable. Name it
Email Body, set Type toString, and paste the full HTML into Value.The variable is the key step. If you paste the HTML directly into the email body field, most tags do not work. Passed in through a variable, the recipient sees the email exactly as your preview.
-
04
Add Send an email (V2) and use the variable as the body
Add the Office 365 Outlook action Send an email (V2). Enter the recipient and a subject. In Body, choose Enter the data from previous step and select the
Email Bodyvariable.If you only want to add an image to an otherwise normal email, keep just the image block in the variable, write your text in the body, and insert the variable where the image should go.
-
05
Test the flow
Save the flow, click Test, choose Manually and run it. In the recipient's inbox, the email shows the HTML formatting and both embedded images, and the linked image opens its page when clicked.
The same method works inside other flows, such as a Power Automate mail merge.
Tips and common problems
- Do not paste HTML straight into the Send an email (V2) body. Put it in a String variable and insert the variable.
- Images must be hosted somewhere public. Private or login-protected images will not display for recipients.
- Set width and height on each img tag so large images do not overflow the email.
- Preview the HTML in an online editor before building the flow. It is faster than sending test emails.
Related videos
Questions
How do I send an HTML email in Power Automate?
Store the HTML in an Initialize variable action with type String, then select that variable as the Body of the Office 365 Outlook Send an email (V2) action.
How do I embed an image in a Power Automate email?
Add an img tag to your HTML with the image's public URL in the src attribute, store the HTML in a variable, and use the variable as the email body.
Why do my HTML tags not work in the Power Automate email body?
The body editor does not keep most HTML you paste into it. Passing the HTML in through a variable keeps the tags intact.
Do I need a premium connector to send HTML emails?
No. Initialize variable is a built-in action and Send an email (V2) is part of the standard Office 365 Outlook connector.
