string | null
Batch delete messages
Action ID:tools.gmail.batch_delete_messages
Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all. Requires the https://mail.google.com/ scope, which is not in the Gmail provider defaults: add it to the integration’s scopes before connecting, or delegate it to the service account.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/batchDelete
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Batch modify messages
Action ID:tools.gmail.batch_modify_messages
Modifies the labels on the specified messages.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/batchModify
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Create draft
Action ID:tools.gmail.create_draft
Creates a new draft with the DRAFT label. The RFC 2822 message is assembled from the inputs and base64url-encoded before it is sent.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.drafts/create
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
HTML body of the message. Added as an alternative part alongside the plain text body.Default:
null.Plain text body of the message.Default:
null.The
Message-ID header value of the message being replied to. Sets the In-Reply-To and References headers.Default: null.The ID of the thread the message belongs to. To add a message to a thread the
References and In-Reply-To headers must be set in compliance with the RFC 2822 standard, and the Subject headers must match.Default: null.The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Create label
Action ID:tools.gmail.create_label
Creates a new label.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.labels/create
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
Label resource. See https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.labels. Fields: name (the display name of the label), labelListVisibility (the visibility of the label in the label list in the Gmail web interface: labelShow, labelShowIfUnread, labelHide), messageListVisibility (the visibility of messages with this label in the message list in the Gmail web interface: show, hide), and color (an object with textColor and backgroundColor, settable on user labels only).
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Delete draft
Action ID:tools.gmail.delete_draft
Immediately and permanently deletes the specified draft. Does not simply trash it.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.drafts/delete
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Delete label
Action ID:tools.gmail.delete_label
Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.labels/delete
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Delete message
Action ID:tools.gmail.delete_message
Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead. Requires the https://mail.google.com/ scope, which is not in the Gmail provider defaults: add it to the integration’s scopes before connecting, or delegate it to the service account.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/delete
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Delete thread
Action ID:tools.gmail.delete_thread
Immediately and permanently deletes the specified thread. Any messages that belong to the thread are also deleted. This operation cannot be undone. Prefer threads.trash instead. Requires the https://mail.google.com/ scope, which is not in the Gmail provider defaults: add it to the integration’s scopes before connecting, or delegate it to the service account.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.threads/delete
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Get draft
Action ID:tools.gmail.get_draft
Gets the specified draft.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.drafts/get
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The format to return the draft in. Allowed values: minimal (only the message ID and labels), full (the full message data with the body parsed in the payload field), raw (the full message data with the body in the raw field as a base64url encoded string), metadata (only the message ID, labels, and headers). Defaults to full.Default:
null.The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Get Gmail attachment
Action ID:tools.gmail.get_attachment
Download an attachment from a Gmail message
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages.attachments/get
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
Get Gmail message
Action ID:tools.gmail.get_message
Get full content of a Gmail message by ID
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/get
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
Format: ‘full’ (complete), ‘metadata’ (headers only), ‘minimal’ (IDs only), ‘raw’ (RFC 2822)Default:
"full".Get Gmail message headers
Action ID:tools.gmail.get_message_headers
Get only headers of a Gmail message (faster than full message)
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/get
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
Specific headers to return (e.g., [‘From’, ‘To’, ‘Subject’]). If not specified, returns all headers.Default:
null.Get Gmail thread
Action ID:tools.gmail.get_thread
Get all messages in an email thread
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.threads/get
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
Get label
Action ID:tools.gmail.get_label
Gets the specified label.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.labels/get
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Get profile
Action ID:tools.gmail.get_profile
Gets the current user’s Gmail profile.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users/getProfile
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".List drafts
Action ID:tools.gmail.list_drafts
Lists the drafts in the user’s mailbox.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.drafts/list
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
Maximum number of drafts to return. This field defaults to 100. The maximum allowed value for this field is 500.Default:
null.Only return draft messages matching the specified query. Supports the same query format as the Gmail search box.Default:
null.The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".List Gmail labels
Action ID:tools.gmail.list_labels
List all Gmail labels for the user
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.labels/list
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
List history
Action ID:tools.gmail.list_history
Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId).
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.history/list
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
Returns history records after the specified startHistoryId. The supplied startHistoryId should be obtained from the historyId of a message, thread, or previous list response. History IDs increase chronologically but are not contiguous with random gaps in between valid IDs. Supplying an invalid or out of date startHistoryId typically returns an HTTP 404 error code. A historyId is typically valid for at least a week, but in some rare circumstances may be valid for only a few hours.
History types to be returned by the function. Allowed values: messageAdded, messageDeleted, labelAdded, labelRemoved.Default:
null.Maximum number of history records to return. This field defaults to 100. The maximum allowed value for this field is 500.Default:
null.The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".List threads
Action ID:tools.gmail.list_threads
Lists the threads in the user’s mailbox.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.threads/list
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
Only return threads with labels that match all of the specified label IDs.Default:
null.Maximum number of threads to return. This field defaults to 100. The maximum allowed value for this field is 500.Default:
null.Only return threads matching the specified query. Supports the same query format as the Gmail search box.Default:
null.The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Modify message
Action ID:tools.gmail.modify_message
Modifies the labels on the specified message.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/modify
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
A list of IDs of labels to add to this message. You can add up to 100 labels with each update.Default:
null.A list of IDs of labels to remove from this message. You can remove up to 100 labels with each update.Default:
null.The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Modify thread
Action ID:tools.gmail.modify_thread
Modifies the labels applied to the thread. This applies to all messages in the thread.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.threads/modify
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
A list of IDs of labels to add to this thread. You can add up to 100 labels with each update.Default:
null.A list of IDs of labels to remove from this thread. You can remove up to 100 labels with each update.Default:
null.The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Patch label
Action ID:tools.gmail.patch_label
Patch the specified label.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.labels/patch
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
Label resource. See https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.labels. Fields: name (the display name of the label), labelListVisibility (the visibility of the label in the label list in the Gmail web interface: labelShow, labelShowIfUnread, labelHide), messageListVisibility (the visibility of messages with this label in the message list in the Gmail web interface: show, hide), and color (an object with textColor and backgroundColor, settable on user labels only).
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Search Gmail messages
Action ID:tools.gmail.search_messages
Search Gmail messages using Gmail’s powerful query syntax
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/list
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
Gmail search query (e.g., ‘from:suspicious@evil.com has:attachment’)
Maximum number of results to return. The maximum allowed value for this field is 500.Default:
10.Send draft
Action ID:tools.gmail.send_draft
Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.drafts/send
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Send message
Action ID:tools.gmail.send_message
Sends the specified message to the recipients in the To, Cc, and Bcc headers. The RFC 2822 message is assembled from the inputs and base64url-encoded before it is sent.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/send
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
HTML body of the message. Added as an alternative part alongside the plain text body.Default:
null.The
Message-ID header value of the message being replied to. Sets the In-Reply-To and References headers.Default: null.The ID of the thread the message belongs to. To add a message to a thread the
References and In-Reply-To headers must be set in compliance with the RFC 2822 standard, and the Subject headers must match.Default: null.The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Trash message
Action ID:tools.gmail.trash_message
Moves the specified message to the trash.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/trash
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Trash thread
Action ID:tools.gmail.trash_thread
Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.threads/trash
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Untrash message
Action ID:tools.gmail.untrash_message
Removes the specified message from the trash.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/untrash
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Untrash thread
Action ID:tools.gmail.untrash_thread
Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.threads/untrash
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
The user’s email address. The special value
me can be used to indicate the authenticated user.Default: "me".Update draft
Action ID:tools.gmail.update_draft
Replaces a draft’s content. The RFC 2822 message is assembled from the inputs and base64url-encoded before it is sent.
Reference: https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.drafts/update
Secrets
Optional secrets:google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_USER_TOKEN.google_gmail_oauth: OAuth tokenGOOGLE_GMAIL_SERVICE_TOKEN.google_api: required valuesGOOGLE_API_CREDENTIALS; optional valuesGOOGLE_API_SUBJECT.
Input fields
HTML body of the message. Added as an alternative part alongside the plain text body.Default:
null.The
Message-ID header value of the message being replied to. Sets the In-Reply-To and References headers.Default: null.The ID of the thread the message belongs to. To add a message to a thread the
References and In-Reply-To headers must be set in compliance with the RFC 2822 standard, and the Subject headers must match.Default: null.