Skip to main content

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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

array[string]
required
The IDs of the messages to delete.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

array[string]
required
The IDs of the messages to modify. There is a limit of 1000 ids per request.
array[string] | null
A list of label IDs to add to messages.Default: null.
array[string] | null
A list of label IDs to remove from messages.Default: null.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
Subject line of the message.
string
required
Comma-separated list of recipient email addresses for the To header.
string | null
Comma-separated list of recipient email addresses for the Bcc header.Default: null.
string | null
HTML body of the message. Added as an alternative part alongside the plain text body.Default: null.
string | null
Plain text body of the message.Default: null.
string | null
Comma-separated list of recipient email addresses for the Cc header.Default: null.
string | null
The Message-ID header value of the message being replied to. Sets the In-Reply-To and References headers.Default: null.
string | null
Email address for the Reply-To header.Default: null.
string | 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.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

object
required
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).
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the draft to delete.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the label to delete.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the message to delete.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
ID of the Thread to delete.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the draft to retrieve.
string | null
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.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The attachment ID to retrieve
string
required
The message ID containing the attachment
string
User ID or ‘me’ for authenticated userDefault: "me".

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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The message ID to retrieve
string
Format: ‘full’ (complete), ‘metadata’ (headers only), ‘minimal’ (IDs only), ‘raw’ (RFC 2822)Default: "full".
string
User ID or ‘me’ for authenticated userDefault: "me".

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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The message ID to retrieve headers for
array[string] | null
Specific headers to return (e.g., [‘From’, ‘To’, ‘Subject’]). If not specified, returns all headers.Default: null.
string
User ID or ‘me’ for authenticated userDefault: "me".

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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The thread ID to retrieve
string
Format: ‘full’ (complete), ‘metadata’ (headers only), ‘minimal’ (IDs only)Default: "full".
string
User ID or ‘me’ for authenticated userDefault: "me".

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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the label to retrieve.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

boolean | null
Include drafts from SPAM and TRASH in the results.Default: null.
integer | null
Maximum number of drafts to return. This field defaults to 100. The maximum allowed value for this field is 500.Default: null.
string | null
Page token to retrieve a specific page of results in the list.Default: null.
string | null
Only return draft messages matching the specified query. Supports the same query format as the Gmail search box.Default: null.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
User ID or ‘me’ for authenticated userDefault: "me".

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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
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.
array[string] | null
History types to be returned by the function. Allowed values: messageAdded, messageDeleted, labelAdded, labelRemoved.Default: null.
string | null
Only return messages with a label matching the ID.Default: null.
integer | null
Maximum number of history records to return. This field defaults to 100. The maximum allowed value for this field is 500.Default: null.
string | null
Page token to retrieve a specific page of results in the list.Default: null.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

boolean | null
Include threads from SPAM and TRASH in the results.Default: null.
array[string] | null
Only return threads with labels that match all of the specified label IDs.Default: null.
integer | null
Maximum number of threads to return. This field defaults to 100. The maximum allowed value for this field is 500.Default: null.
string | null
Page token to retrieve a specific page of results in the list.Default: null.
string | null
Only return threads matching the specified query. Supports the same query format as the Gmail search box.Default: null.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the message to modify.
array[string] | null
A list of IDs of labels to add to this message. You can add up to 100 labels with each update.Default: null.
array[string] | null
A list of IDs of labels to remove from this message. You can remove up to 100 labels with each update.Default: null.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the thread to modify.
array[string] | null
A list of IDs of labels to add to this thread. You can add up to 100 labels with each update.Default: null.
array[string] | null
A list of IDs of labels to remove from this thread. You can remove up to 100 labels with each update.Default: null.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

object
required
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).
string
required
The ID of the label to update.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
Gmail search query (e.g., ‘from:suspicious@evil.com has:attachment’)
integer
Maximum number of results to return. The maximum allowed value for this field is 500.Default: 10.
string | null
Page token for paginationDefault: null.
string
User ID or ‘me’ for authenticated userDefault: "me".

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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The immutable ID of the draft to send.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
Subject line of the message.
string
required
Comma-separated list of recipient email addresses for the To header.
string | null
Comma-separated list of recipient email addresses for the Bcc header.Default: null.
string | null
HTML body of the message. Added as an alternative part alongside the plain text body.Default: null.
string | null
Plain text body of the message.Default: null.
string | null
Comma-separated list of recipient email addresses for the Cc header.Default: null.
string | null
The Message-ID header value of the message being replied to. Sets the In-Reply-To and References headers.Default: null.
string | null
Email address for the Reply-To header.Default: null.
string | 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.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the message to move to trash.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the thread to Trash.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the message to remove from Trash.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the thread to remove from Trash.
string
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 token GOOGLE_GMAIL_USER_TOKEN.
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_SERVICE_TOKEN.
  • google_api: required values GOOGLE_API_CREDENTIALS; optional values GOOGLE_API_SUBJECT.

Input fields

string
required
The ID of the draft to update.
string
required
Subject line of the message.
string
required
Comma-separated list of recipient email addresses for the To header.
string | null
Comma-separated list of recipient email addresses for the Bcc header.Default: null.
string | null
HTML body of the message. Added as an alternative part alongside the plain text body.Default: null.
string | null
Plain text body of the message.Default: null.
string | null
Comma-separated list of recipient email addresses for the Cc header.Default: null.
string | null
The Message-ID header value of the message being replied to. Sets the In-Reply-To and References headers.Default: null.
string | null
Email address for the Reply-To header.Default: null.
string | 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.
string
The user’s email address. The special value me can be used to indicate the authenticated user.Default: "me".