Gmail icon

Gmail

Send emails via the Gmail API

Actions3

Message → Send

AI-generated

Summary

Sends an email immediately from the authenticated Gmail account via the Gmail API (users/me/messages/send), with optional CC, BCC, reply-to, alias/sender name, and binary attachments.

Inputs

  • To (required) — Recipient addresses, comma-separated. Each must contain '@' or the item errors with 'Invalid email address'. Addresses without angle brackets are wrapped as
    .
  • Subject (required) — Email subject line.
  • Email Type (required) — Text or HTML (default HTML). Determines whether Message is sent as the plain-text body or the HTML body.
  • Message (required) — Body content, trimmed before sending.
  • Options > Attachments — One or more entries naming binary fields on the input item (default 'data'). Each entry may list several field names separated by commas. Errors if a field has no binary data.
  • Options > BCC — Blind-copy recipients, comma-separated.
  • Options > CC — Copy recipients, comma-separated.
  • Options > From Alias Name or ID — Send-as alias chosen from the account's Gmail aliases (loaded from settings/sendAs), or an expression.
  • Options > Sender Name — Display name for the From header. The node fetches the account profile email, or uses the selected alias, to build 'Name
    '.
  • Options > Send Replies To — Reply-To address. It goes through the same email validation as the other address fields.

Output shape

One output item per input item, containing the Gmail API response for the sent message. This is typically the message id and threadId, plus labelIds.

The node runs once per input item. With Continue On Fail enabled, a failed item yields {error: message (item N)} instead of stopping the workflow. Without it, the node throws. Requires gmailOAuth2 credentials. The response is not a full message. Fetch the message separately if you need its content.

Examples

Example 1: Send an HTML notification to a customer with a CC to support

To: {{$json.email}}; Subject: 'Your order shipped'; Email Type: HTML; Message: HTML template; Options: CC support@example.com.

Example 2: Email a generated PDF report from a previous node

Email Type: Text; Message: 'Report attached'; Options > Attachments: Attachment Field Name 'data'.

Example 3: Send from a send-as alias with a custom display name

Options: From Alias = team@example.com, Sender Name = 'Acme Team', Send Replies To = reply@example.com.

Links

Discussion