Send Gmail messages with custom aliases and attachments via API
Ready for 3.0What this workflow does
This workflow has 6 nodes and runs when an HTTP POST request hits its webhook URL. It uses only n8n's built-in nodes. It also calls gmail.googleapis.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- If: checks a condition and branches into true / false
- Split Out: splits a list into separate items
- Download Attachments (HTTP Request): calls an HTTP API
- Format Email Payload (Code): runs custom JavaScript code
- Send Gmail as Alias (HTTP Request): calls gmail.googleapis.com (POST)
HTTP calls to: gmail.googleapis.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (5)
- HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Split Out
n8n-nodes-base.splitOut - If
n8n-nodes-base.if - Webhook
n8n-nodes-base.webhook
From the author
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…