integrations.gmail_send

Gmail Send (integrations.gmail_send)

Send email through the connected Gmail account — one message per input item, with the item's files as attachments.

Parameters

ParameterTypeDefaultDescription
toexpressionRecipient(s); comma-separate for several.
subjectexpressionUnicode/emoji safe.
body_textexpressionPlain-text body.
body_htmlexpressionOptional; when set the mail goes out as multipart/alternative (text + HTML).
attachmentslist[]$binary field names to attach. Empty = attach every file on the item, any type.

Credential: oauth2_google (gmail.send scope).

Behavior

Each input item builds a standards-compliant MIME message and posts it to messages.send. The output item is Gmail's response (id, threadId) with paired_item lineage.

form (file upload) → gmail_send (to: {{ $json.email }})   # file arrives attached

Quirks & tips

  • Header injection is refused. A to/subject value smuggling a newline (a@b.c\nBcc: …) fails the node before anything is sent — pinned by test.
  • A named-but-missing attachment field is a clear error (and nothing sends); the attach-everything default simply attaches nothing when the item has no files.
  • An empty to fails the item with its index — check your expression when fanning out over items.
  • Sends are sequential, one API call per item — Gmail's own rate limits apply for large batches.
  • The sender is always the connected account (users/me); custom From headers aren't supported.

Related

  • Error Trigger — the classic "workflow failed → email me" pair.
  • Create File — build a csv/xlsx to attach.
  • Google Drive — store the file instead of mailing it.