Gmail
Read, search, draft and send email through a Gmail account, and react to newly received messages.
Managed auth
Authentication
Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.
OAuth 2.0
PKCEDefault scopes
https://www.googleapis.com/auth/gmail.sendhttps://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/gmail.compose
Tools (4)
Send email
GMAIL_SEND_EMAILSends an email from the connected Gmail account immediately. Use it when the user explicitly wants a message delivered; use GMAIL_CREATE_DRAFT instead if they want to review first. Sending is irreversible and subject to Gmail daily sending limits.
Required scopes
https://www.googleapis.com/auth/gmail.send
Input
Send email input Name Type Description torequiredstring[]Recipient email addresses. subjectrequiredstringSubject line. bodyrequiredstringMessage body. Plain text unless is_html is true. ccstring[]Cc recipients. bccstring[]Bcc recipients. is_htmlbooleanSet true when body contains HTML.Default: falsethread_idstringGmail thread id to send the message into as a reply. List messages
GMAIL_LIST_MESSAGESLists message ids and thread ids matching a Gmail search query, newest first. Use it to find mail, then call GMAIL_GET_MESSAGE for content. Returns ids only; paginated with next_cursor.
Required scopes
https://www.googleapis.com/auth/gmail.readonly
Input
List messages input Name Type Description querystringGmail search syntax, e.g. 'from:alice is:unread newer_than:2d'. Omit to list all. label_idsstring[]Only messages having all of these label ids, e.g. 'INBOX', 'UNREAD'. include_spam_trashbooleanInclude messages from Spam and Trash.Default: falselimitintegerMaximum number of items to return (1-100, default 20).Default: 20cursorstringPagination cursor: pass the next_cursor value of the previous response. Omit for the first page. Get message
GMAIL_GET_MESSAGEFetches one Gmail message by id with parsed headers and a decoded text body. Use it after GMAIL_LIST_MESSAGES. Large bodies are truncated and attachments are listed by name only, not downloaded.
Required scopes
https://www.googleapis.com/auth/gmail.readonly
Input
Get message input Name Type Description message_idrequiredstringGmail message id from GMAIL_LIST_MESSAGES. formatstring'full' includes the body, 'metadata' returns headers and snippet only.One of: full,metadataDefault:"full"Create draft
GMAIL_CREATE_DRAFTSaves an email as a draft in the connected Gmail account without sending it. Use it when the user wants to review or edit before sending, or when sending is not yet approved.
Required scopes
https://www.googleapis.com/auth/gmail.compose
Input
Create draft input Name Type Description tostring[]Recipient email addresses.Default: []subjectstringSubject line.Default: ""bodyrequiredstringMessage body. Plain text unless is_html is true. ccstring[]Cc recipients. bccstring[]Bcc recipients. is_htmlbooleanSet true when body contains HTML.Default: false
Triggers (1)
Message receivedPolling
GMAIL_MESSAGE_RECEIVEDFires for each new message arriving in the connected mailbox, optionally limited to a label or search query. Polled every 60 seconds (delivery can lag by about a minute); at most 25 messages are fetched per poll, a larger burst arrives over the following polls.
Required scopes
https://www.googleapis.com/auth/gmail.readonly
Config
Message received config Name Type Description label_idstringOnly messages carrying this label id, e.g. 'INBOX'.Default: "INBOX"querystringExtra Gmail search filter, e.g. 'from:billing@example.com'.

