Gmail

Seventeen operations against a connected Google account — send and reply in-thread, create and send drafts, search the inbox, read threads, and manage labels. Every string field takes {{payload.x}} templates, and the whole set can be handed to an AI Node as function-calling tools.

Overview

The Gmail node used to be a provider setting inside Email Action. It is now its own node, because the two do genuinely different things: Email Action renders a template and sends it through Resend, while Gmail talks to a real mailbox you own — with a thread history, labels, drafts and read state.

Existing Gmail nodes moved over automatically, keeping their credential, operation and configuration. Their canvas connections and any AI Node that used them as a tool were repointed in the same migration.

Credential and scopes

Connect a Google account under Settings › Credentials, or straight from the node's Google Account section — the picker requests the right scopes for you. Until an account is connected the node has nothing to configure and shows only that section.

Older credentials carrying just gmail.send still work for send. Everything else — drafts, labels, threads, and the AI toolkit — needs a gmail_full credential (read, modify, compose). If you see “insufficient authentication scopes”, re-authorize the credential to upgrade it in place.


Operations

Messages

  • send — send a new message
  • replyToThread — reply preserving thread headers
  • getMessage — fetch by id
  • listMessages — search with Gmail query syntax
  • deleteMessage — trash (default) or hard delete
  • markRead / markUnread
  • addLabel / removeLabel

Drafts

  • createDraft — save without sending
  • sendDraft — send one saved earlier

Labels

  • listLabels
  • createLabel — supports / for nesting

Threads

  • getThread — full conversation
  • trashThread / untrashThread

Human in the loop

  • sendAndWaitForResponse — pause until someone answers

Seventeen in total. Sixteen of them are offered as AI tools: sendAndWaitForResponse is not, because a tool call cannot sit and wait for a human — it only makes sense inside a pipeline, where the run pauses and resumes.


operationConfig

Every operation reads its parameters from operationConfig, and the node's form is generated from each operation's schema — pick the operation and you get exactly its fields. String values support {{payload.x}} templates.

// Create a draft reply to the sender
{
  "credentialId": "<cred-id>",
  "operation": "createDraft",
  "operationConfig": {
    "to": ["{{payload.from}}"],
    "subject": "Re: {{payload.subject}}",
    "body": "<p>Thanks for reaching out — I'll reply by end of day.</p>",
    "threadId": "{{payload.threadId}}"
  }
}

// Label every incoming invoice
{
  "credentialId": "<cred-id>",
  "operation": "addLabel",
  "operationConfig": {
    "messageId": "{{payload.id}}",
    "labelIds": ["Label_Invoices"]
  }
}

// List unread emails from a sender
{
  "credentialId": "<cred-id>",
  "operation": "listMessages",
  "operationConfig": {
    "query": "from:[email protected] is:unread",
    "maxResults": 10
  }
}
replyToThread looks up the original thread's headers and sets In-Reply-To + References before sending, so Gmail groups the reply into the original conversation every time.

AI toolkit mode

Flip the AI toolkit card instead of picking a single operation. The Gmail node does not run an LLM in this mode — it gets exposed as 16 tools to any AI Node that picks it from the tool picker. That AI Node's model (your provider keys, your costs) reads the user message and decides which operation to call.

{
  "name": "Smart inbox toolkit",
  "credentialId": "<gmail-cred>",
  "aiEnabled": true
}

On the AI Node side, open the Tools tab → Use a workspace node as a tool and pick this node. The picker sees aiEnabled=true and offers the sixteen at once (send_email, draft_email, add_email_label, …) — check only the ones that flow needs. Each arrives with its own focused input schema, and the tool call lands here with operation already resolved.

Why sixteen tools instead of one multi-op tool? Models choose better when each tool has a focused description and a focused schema. The node's identity, credential and rate-limit budget are shared across all of them.
In toolkit mode the canvas connection handles disappear: the node is wired through the AI Node's tool list, not through edges. If it still has pipeline edges from before you flipped the card, the panel says so — they would fire with an empty recipient on every event.

Send and wait for a response

sendAndWaitForResponse sends the message with Approve / Disapprove links and pauses the run until someone clicks — or until the timeout you set expires. The answer arrives downstream under _waitResponse, with approved, who decided, and when.

Turn on requireDisapproveComment and a disapproval asks for a reason first; the text lands in _waitResponse.comment, ready for a downstream node to act on. Approving stays one click — asking for a justification on the happy path is friction with no upside.


Canvas integration

The node carries the Gmail logo and shows its recipient for a send, or the operation name for any of the other sixteen. Connect anything upstream that produces a payload — a trigger, a filter, an AI node — and reference its fields with the data picker.


API Reference

MethodEndpointDescription
GET/api/gmail-actionsList all Gmail nodes for your organization
POST/api/gmail-actionsCreate a new Gmail node
GET/api/gmail-actions/:idGet a single Gmail node by ID
PATCH/api/gmail-actions/:idUpdate a Gmail node
DELETE/api/gmail-actions/:idDelete a Gmail node
GET/api/gmail-actions/labels/:credentialIdList the account's labels — used by the label pickers