Send HTML Emails with Embedded Images via Gmail
detail.loadingPreview
Effortlessly send visually engaging HTML emails directly from your Gmail account, complete with images embedded inline within the email body. This workflow automates fetching images, composing complex MIME structures, and delivering rich content to your recipients.
About This Workflow
This powerful n8n workflow streamlines the process of sending sophisticated HTML emails that feature images embedded directly into the email body, rather than attached. It starts by defining your email's core content – sender, recipient, subject, and an HTML body with a placeholder for your image. The workflow then intelligently fetches an image from a specified URL, converts it into a base64 string, and skillfully constructs a multipart/related MIME email. Finally, it leverages the Gmail API via an HTTP Request node to send your perfectly formatted, image-rich email, ensuring a professional and engaging recipient experience for various communication needs.
Key Features
- Embedded Images: Send emails with images appearing directly within the HTML body, not as separate attachments.
- Dynamic Image Fetching: Automatically retrieves images from any public URL, ready for embedding.
- Customizable Email Content: Easily set sender, recipient, subject, and the full HTML body for personalized messaging.
- Advanced Gmail Integration: Utilizes the Gmail API for robust and flexible email sending capabilities.
- MIME Multipart Handling: Correctly formats emails for complex content types, ensuring broad client compatibility and proper image display.
How To Use
- Configure 'Message settings' node:
- Update the
fromandtoemail addresses to your desired sender and recipient. - Set your desired
subjectfor the email. - Customize the
body_htmland ensure it includes<img src='cid:image1'>where you want your image to appear inline.
- Update the
- Update 'Get image' node:
- Replace the existing
URLwith the URL of the specific image you wish to embed in your emails.
- Replace the existing
- Set up 'Send message' node:
- Under the 'Credentials' section, add or select your Gmail OAuth2 credential to allow n8n to send emails from your account.
- Test the Workflow: Click 'Test workflow' on the 'When clicking "Test workflow"' node to send a test email and verify the embedded image appears correctly.
Apps Used
Workflow JSON
{
"id": "35e02b55-f9f9-47fa-9175-6a8893a90f14",
"name": "Send HTML Emails with Embedded Images via Gmail",
"nodes": 6,
"category": "Marketing",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 35e02b55-f9f9...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Related Workflows
Discover more workflows you might like
WhatsApp AI Assistant: LLaMA 4 & Google Search for Real-Time Insights
Instantly deploy a smart AI assistant on WhatsApp, powered by Groq's lightning-fast LLaMA 4 model. This workflow enables real-time conversations, remembers context, and provides up-to-date answers by integrating live Google Search results.
AI-Powered On-Page SEO Audit & Report Automation
Instantly generate comprehensive on-page SEO technical and content audits for any website URL. This AI-powered workflow automates the entire process, from scraping the page to delivering a detailed report directly to your inbox, empowering you to optimize for better search rankings and user engagement.
Automated AI Motion Illustration Workflow with Midjourney and Kling
Unleash your creativity with this n8n workflow that automates the generation of stunning motion illustrations. It leverages the power of Midjourney for static image creation and Kling AI to transform them into dynamic videos, all managed through the PiAPI. Perfect for content creators, marketers, and social media professionals looking to produce engaging visuals at scale.