Gmail
Connects to the Gmail API for reading and sending email. An agent can list and search the inbox, read full message content, and send new emails.
Add to an agent node's tools array with _node_type: "tool-gmail". See Connector Reference — How connectors are used.
Authentication
| Field | Required | Description |
|---|---|---|
access_token | Yes | OAuth2 access token for the Gmail API, sent as Authorization: Bearer <token>. Typically populated from a stored OAuth connection via oauth_connection_id. |
{
"name": "gmail",
"_node_type": "tool-gmail",
"oauth_connection_id": "{{ connections.gmail }}"
}
Tools
gmail_list_emails
List emails from the Gmail inbox.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
max_results | number | No | Max messages to list (default 10) |
query | string | No | Gmail search query (e.g. is:unread, from:someone@example.com) |
Returns: A newline-separated list of message summaries (From/To/Subject/Date/Snippet) for up to 5 messages, with a trailing "... and N more" line if there are additional matches, or "No messages found.".
gmail_get_email
Get the full content of a Gmail message.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
message_id | string | Yes | Gmail message ID |
Returns: A text block with the message ID, From/To/Subject/Date headers, and the message snippet.
gmail_send_email
Send an email via Gmail.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient email address |
subject | string | Yes | Email subject |
body | string | Yes | Email body (plain text) |
Returns: A confirmation message including the recipient and the new message ID.
gmail_search
Search Gmail messages using Gmail query syntax.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Gmail search query (e.g. 'from:boss@company.com subject:report') |
max_results | number | No | Max results (default 10) |
Returns: A list of matching message summaries (From/To/Subject/Date/Snippet) for up to 5 results, separated by ---, or "No messages matching query.".