Templates / Send Gmail messages with custom aliases and attachments via API

Send Gmail messages with custom aliases and attachments via API

Ready for 3.0

by Jacob @ vwork Digital · 1,290 views · created 2025-07-02 · Personal Productivity

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (5)

What it does

This n8n template allows you to send emails with a custom alias from your Gmail account Since the native Gmail node has some limitations regarding use of email aliases, this template allows you to set up your own internal endpoint/sub-workflow to send emails as an email alias . How it works This workflow uses a Code node and the Gmail API via an HTTP node to format the email content and send using an alias on your Gmail account. Setup instructions 1. You must have added the email address as an alias you wish to send as in your Gmail account, guide on how to do so here. 2. You must have created a Gmail credential in N8N, guide on how to do so here. 3. Use your Gmail OAuth Credential in the HTTP node. 4. Use this template as an API endpoint or a sub-workflow, and send this payload to it via POST: { "senderName": "SENDER NAME HERE", "fromEmail": "FROM EMAIL HERE", "replyTo": "REPLY TO EMAIL HERE", "toEmail": "[email protected]", "subject": "SUBJECT LINE HERE", "htmlBody": "HTML BODY HERE - MUST BE JSON STRINGIFIED", "fileurls": "FILE URLS FOR ATTACHMENTS HERE" } Notes Only the following are required fields: - fromEmail - toEmail - subject - htmlBody Customizing this workflow You can easily convert this to a sub-workflow by swapping out the Webhook trigger for a "When executed by another workflow" trigger

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.