Gmail icon

Gmail

Send emails via the Gmail API

Actions3

Draft → Send

AI-generated

Summary

Sends an existing Gmail draft by its ID via the Gmail API (POST /gmail/v1/users/me/drafts/send), using the connected gmailOAuth2 account.

Inputs

  • Draft ID (required) — ID of the draft to send (the parameter is internally named messageId), e.g. r-3254521568507167962. Evaluated per input item, so it can be set by an expression, such as the ID returned by Draft > Create.

Output shape

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

Each result is paired to its input item. A draft that doesn't exist gives a 'Draft not found' error, and a malformed ID gives an 'Invalid draft ID' error. With Continue On Fail enabled, failed items return {error: message} with '(item N)' appended instead of stopping the workflow. The draft's recipients, subject and body are fixed when the draft is created, and this operation can't change them.

Examples

Example 1: Create a draft, then send it after an approval step.

Resource: Draft, Operation: Send, Draft ID: ={{ $('Create Draft').item.json.id }}

Example 2: Send a known draft by hard-coded ID.

Resource: Draft, Operation: Send, Draft ID: r-3254521568507167962

Links

Discussion