Gmail Send

The Gmail Send node sends an email from a Gmail or Google Workspace account through the Gmail API, with the same gmail credential as the Gmail Trigger.

The Gmail Send node sends an email from a Gmail or Google Workspace account through the Gmail API, with the same gmail credential as the Gmail Trigger. It has every field of the Send Email node (To, Cc, Bcc, Subject, Body and Drive attachments), and there is no App Password or SMTP server to set up. The sent email appears in the account's Sent mail.

Overview

PropertyValue
Inputs1
Outputs1
Output$nodeLabel.status, $nodeLabel.to, $nodeLabel.cc, $nodeLabel.bcc, $nodeLabel.subject, $nodeLabel.attachment_count, $nodeLabel.from, $nodeLabel.message_id, $nodeLabel.thread_id

Parameters

ParameterTypeDescription
credentialIdUUIDgmail credential (Google OAuth)
fromAddressexpressionOptional. One of the account's Send mail as addresses. Blank sends as the account, with the name Gmail shows for it
toexpressionRecipient(s). Comma-separated for multiple; a quoted name such as "Doe, John" <john@example.com> counts as one
ccexpressionCarbon-copy recipient(s)
bccexpressionBlind carbon-copy recipient(s). Hidden from other recipients
subjectexpressionEmail subject
emailBodyexpressionEmail body. A body with HTML tags such as <p>, <div>, <table> or <br> is sent as HTML with a plain-text alternative
attachmentsexpressionComma-separated Drive file IDs to attach. Only files owned by the workflow owner or shared with one of their teams can be attached

A blank Subject or Body stays blank. Every text field accepts $ expressions, and each one can be left to an Agent when the node is attached as a tool.

Setup Guide

  1. Create a gmail credential as described in the Gmail Trigger setup. The same credential reads and sends mail: gmail.modify covers both, so a credential that already runs a Gmail Trigger can send without reconnecting.
  2. Drag Gmail Send onto the canvas and select the credential.
  3. Leave From blank to send as the account, or click one of the account's addresses shown under it. The list holds the primary address and the Send mail as aliases set up in Gmail settings.
  4. Fill in To, Subject and Body, and optionally Cc, Bcc and Attachments.

From Address

Gmail only sends as an address the account owns: its primary address or a verified Send mail as alias. When From names any other address, the node fails with a clear error before anything is sent, instead of Gmail quietly sending from the primary address.

Example

Answer an email that a Gmail Trigger labelled supportGmail started the run with:

{
  "type": "gmailSend",
  "data": {
    "label": "replyByGmail",
    "credentialId": "gmail-credential-uuid",
    "fromAddress": "support@example.com",
    "to": "$supportGmail.email.fromAddresses[0].email",
    "subject": "Re: $supportGmail.email.subject",
    "emailBody": "<p>Hi,</p><p>$draftReply.text</p>",
    "attachments": "$drive.id"
  }
}

Notes

  • Gmail accepts messages up to 35 MB, attachments included.
  • message_id and thread_id are Gmail's ids for the sent email, for a later node that labels or looks it up.
  • A run with attachments runs on the main instance of a cluster, where Drive files are stored. Without attachments it can run on any instance.
  • Use Send Email for other mail providers.