Send Gmail Messages with Custom Aliases and Attachments via API
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 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. You must have created a Gmail credential in N8N, guide on how to do so here. Use your Gmail OAuth Credential in the HTTP node. 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": "jacob@vwork.digital", "subject": "SUBJECT LINE HERE", "htmlBody": "HTML BODY HERE - MUST BE JSON STRINGIFIED", "file_urls": [ "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
Related Templates
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments