Learn how to send professional emails with inline embedded images using custom MIME construction and an HTTP Request n8n node. This n8n workflow template provides advanced Gmail automation capabilities.
Download this n8n workflow template and start using it instantly.
Automation specialists needing granular control over email formatting.
Users requiring reliable inline image embedding that bypasses standard Gmail attachment behavior.
Developers looking for advanced n8n templates for custom email reporting.
Anyone utilizing n8n to generate and distribute visual data or charts.
This advanced n8n workflow addresses a common challenge in email automation: embedding an image directly into the email body (inline) rather than just attaching it. While standard Gmail n8n nodes often default to attachments, this specific n8n workflow template leverages the raw power of the Gmail API via an HTTP Request n8n node. It fetches an image, converts it to base64 encoding, and then expertly constructs a multipart MIME message. This ensures your recipients see the image immediately displayed within the email content, making it a powerful and professional solution for automated reports or notifications generated by an n8n workflow. Using this powerful n8n workflow means you control the exact presentation of your emails.
The process begins with the manual n8n trigger, labeled "When clicking 'Test workflow'". First, the "Message settings" n8n node defines the sender, recipient, subject, and the crucial HTML body which includes the placeholder . Next, the "Get image" n8n node fetches the desired binary image data from a specified external URL. The "Convert image to base64" n8n node then prepares this image for embedding by transforming the binary data into a base64 string, assigning it to a property called chart1. The "Compose message" n8n node uses extensive expressions to combine the email headers, the HTML body, and the base64 encoded image data into a complex raw MIME message structure, adhering to the multipart/related specification required for inline embedding. Finally, the "Send message" n8n node (an HTTP Request n8n node configured with Gmail OAuth) posts the final base64-encoded raw MIME message to the Gmail API's /messages/send endpoint, completing the execution of the n8n workflow.
To install and utilize this high-level n8n workflow template:
from and to values with your actual sender and recipient email addresses. When clicking "Test workflow" (n8n trigger): This manual n8n trigger node is used strictly for development and testing. It initiates the n8n workflow process immediately upon clicking 'Test workflow'.
Message settings (Set n8n node): This n8n node defines the core parameters of the email. Key configuration includes defining the HTML body as , establishing the link between the HTML and the embedded image data.
Get image (HTTP Request n8n node): Fetches the external image file as binary data from a specified URL. This binary data is essential for the next step of the n8n workflow.
Convert image to base64 (Extract From File n8n node): Converts the incoming binary image data into a base64 string, which is necessary for embedding the image within the MIME structure. It stores the result in a property named chart1.
Compose message (Set n8n node): This highly specialized n8n node generates the entire raw MIME payload. It uses complex string concatenation and template literals to structure the email headers, the HTML content, the image MIME block, and the base64 encoded image data ($json.chart1).
Send message (HTTP Request n8n node): This final n8n node sends the constructed raw MIME message to the Gmail API. It requires Gmail OAuth authentication and ensures the raw data is base64 encoded again before sending it in the API request body. This is the crucial step that executes the Gmail automation portion of the n8n workflow.
Deploy an n8n workflow to publish test or operational messages instantly to an AWS SNS topic using the specialized n8n node. Ideal for automated alerts and testing n8n templates.

Automate notifications for sales campaign replies. Use this n8n workflow to instantly post alerts to Mattermost whenever a contact replies via the Emelia outreach platform.

Use this n8n workflow to automatically send a notification to Mattermost whenever the n8n workflow itself is updated or saved. Enhance monitoring using these ready-to-use n8n templates.

Learn how to use this basic n8n workflow template to post immediate status updates to Twitter. Configure the Twitter n8n node easily for social media automation.









































