Back to Templates
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 .
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.
{
"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",
"file_urls": [
"FILE URLS FOR ATTACHMENTS HERE"
]
}
Only the following are required fields:
You can easily convert this to a sub-workflow by swapping out the Webhook trigger for a "When executed by another workflow" trigger