Connect AI Agents to Gmail

Enable agents to draft, send and search emails on your behalf via Gmail

Actions

List drafts

Retrieves a paginated list of email drafts from a user's Gmail account. Use verbose=true to get full draft details including subject, body, sender, and timestamp.

Move to Trash

Moves an existing, non-deleted email message to the trash for the specified user.

Patch Label

Patches the specified label.

Reply to email thread

Sends a reply within a specific Gmail thread using the original thread's subject; requires a valid thread id and properly formatted email addresses. Supports attachments via attachment with valid s3key, mimetype, and name.

Search People

Searches contacts by matching the query against names, nicknames, emails, phone numbers, and organizations, optionally including 'other contacts'.

Send Draft

Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.

Send Email

Sends an email via Gmail API using the authenticated user's Google profile display name; set is_html=true if the body contains HTML. Attachments require valid s3key, mimetype, and name.

Modify email labels

Adds and/or removes specified Gmail labels for a message; ensure message id and all label ids are valid (use 'listlabels' for custom label ids).

Create label

Creates a new label with a unique name in the specified user's Gmail account.

Fetch Message by Thread ID

Retrieves messages from a Gmail thread using its thread id, where the thread must be accessible by the specified user id.

Get People

Retrieves either a specific person's details (using resource name) or lists 'other contacts' (if other_contacts is true); person_fields specifies the data to return.

Get Profile

Retrieves key Gmail profile information (email address, message/thread totals, history id) for a user.

List Gmail labels

Retrieves a list of all system and user-created labels for the specified Gmail account.

List threads

Retrieves a list of email threads from a Gmail account, identified by user id (email address or 'me'), supporting filtering and pagination.

Modify thread labels

Adds or removes specified existing label ids from a Gmail thread, affecting all its messages; ensure the thread id is valid.

Remove label

Permanently deletes a specific, existing user-created Gmail label by its id for a user; cannot delete system labels.