How to embed images in HTML emails using the Microsoft Outlook node?

Describe the problem/error/question
I am building a flow to send HTML emails via the Microsoft Outlook node. My current setup uses a Code node and an HTML node to construct the email body.

I need to include an image inside this HTML content. What is the recommended way to achieve this with the Outlook node? I am unsure if I should use an externally hosted URL in the <img>tag, convert the image to a base64 string directly in the HTML, or pass it as a binary attachment and reference it via CID. Any guidance or examples would be appreciated.

@Benry_Hendix CID via a binary attachment is what works for outlook. external img URLs get blocked by default in most clients (download-pictures security setting), and base64 data: URIs get stripped by outlook desktop. CID stays inline in pretty much every client.

flow:

  1. get the image into n8n as binary (HTTP Request, Read File, whatever)
  2. in ur HTML reference it as
  3. attach the binary on the Outlook node with contentId=logo + isInline=true

if ur Outlook node version doesnt expose contentId/isInline on attachments (older typeVersions hide them), drop down to HTTP Request and hit MS Graph /me/sendMail directly:

reuses ur existing outlook oauth2 credential, just gives u direct control over the attachment fields the node hides. swap the binary reference for whatever ur image node name is

Hi @Benry_Hendix

The best and easiest way to include images is to upload them to a public website or cloud storage service and use a link (URL) in your HTML. This is the most reliable method because it works across almost all email apps and keeps your email size small, which helps prevent your messages from being flagged as spam.

You should avoid converting images into Base64 strings (the long blocks of text that represent an image). While this seems convenient because the image is “built-in” to the code, Microsoft Outlook often blocks these images entirely for security reasons. It also makes the email file much larger, which can cause some email services to clip or hide your content.

There is a more advanced method called “CID” where you attach the image as a file and reference it in the text. While this is a professional standard, it is very difficult to set up in n8n. The standard Outlook node doesn’t have the specific settings required for this, so you would have to use complex API requests and multiple nodes to make it work.

For your specific n8n flow, stick to the URL method. Simply host your images online, define the links in your Code node, and insert those links into your HTML. This is the fastest way to build your workflow and ensures that your recipients will actually see the images you’ve included.