> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gmail

> How to set up the Gmail connector, plus the actions that are available.

![Gmail](https://stackone-logos.com/api/gmail/filled/svg)

v1.1.1[See changelog](https://docs.stackone.com/connectors/gmail/changelog.md)

[42 actions](#actions) · 1 auth method

Messaging

## Getting Started

**1. Create or Select a Project**

Set up a new project or select an existing one. See [Organizations & Projects](https://docs.stackone.com/gateway/concepts/organizations-and-projects.md).

**2. Configure the Connector**

Enable the connector and create a Connector Profile in your project. See [Setup Connector Profile](https://docs.stackone.com/gateway/quickstart.md#setup-connector-profile).

> [card] [OAuth 2.0 · Connector Profile](https://docs.stackone.com/connectors/gmail/guides/connector-profile/oauth-2-0.md)
>
> The steps in this guide require Admin or Owner privileges within Google Cloud.

**3. Link an Account**

Link an account [from the dashboard](https://docs.stackone.com/connect/managing-connectors/linking-accounts.md#link-from-the-dashboard) (or via [StackOne Hub](https://docs.stackone.com/embed/account-linking/overview)).

See the guide for the authentication type chosen in the Connector Profile:

> [card] [OAuth 2.0 · Link Account](https://docs.stackone.com/connectors/gmail/guides/link-account/oauth-2-0.md)

**4. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).

## Actions

Scopes

Select all
|
Clear

https\://​mail.google.com/

https\://​www\.googleapis.com/auth/gmail.compose

https\://​www\.googleapis.com/auth/gmail.labels

https\://​www\.googleapis.com/auth/gmail.metadata

https\://​www\.googleapis.com/auth/gmail.modify

https\://​www\.googleapis.com/auth/gmail.readonly

https\://​www\.googleapis.com/auth/gmail.send

https\://​www\.googleapis.com/auth/gmail.settings.basic

No scopes found

42 actions

ActionDescriptionRequired scopes

Get Attachment`gmail_get_attachment`

Download the base64url-encoded binary content of a specific email attachment by providing the parent message ID and the...

`https://​www.googleapis.com/auth/gmail.readonly`

List Drafts`gmail_list_drafts`

Retrieve a paginated list of all draft emails saved in the authenticated user's Gmail account, returning draft IDs and b...

`https://​www.googleapis.com/auth/gmail.readonly`

Get Draft`gmail_get_draft`

Retrieve the full content of a specific draft email by its draft ID, with configurable response format to control the ve...

`https://​www.googleapis.com/auth/gmail.readonly`

Create Draft`gmail_create_draft`

Create and save a new unsent email draft in Gmail using RFC 2822 formatted message content encoded as base64url, without...

`https://​www.googleapis.com/auth/gmail.compose`

Update Draft`gmail_update_draft`

Fully replace the content of an existing draft by providing a new RFC 2822 message payload, enabling changes to recipien...

`https://​www.googleapis.com/auth/gmail.compose`

Send Draft`gmail_send_draft`

Immediately send a previously saved draft email to all its recipients, removing it from the Drafts folder and placing th...

`https://​www.googleapis.com/auth/gmail.compose`

Delete Draft`gmail_delete_draft`

Permanently and irrecoverably delete a draft email by its draft ID, removing it from the Drafts folder immediately with...

`https://​www.googleapis.com/auth/gmail.compose`

List Filters`gmail_list_filters`

Retrieve all email filter rules configured in the Gmail account that automatically process incoming messages based on cr...

`https://​www.googleapis.com/auth/gmail.readonly`

Get Filter`gmail_get_filter`

Retrieve the complete configuration of a specific Gmail filter rule by its ID, including the full matching criteria defi...

`https://​www.googleapis.com/auth/gmail.readonly`

Create Filter`gmail_create_filter`

Create a new Gmail filter rule that automatically processes future incoming messages matching specified criteria, applyi...

`https://​www.googleapis.com/auth/gmail.settings.basic`

Delete Filter`gmail_delete_filter`

Permanently remove a Gmail filter rule by its ID, immediately stopping all future automatic processing of incoming messa...

`https://​www.googleapis.com/auth/gmail.settings.basic`

List History`gmail_list_history`

Retrieve a chronological log of all mailbox changes since a specific historyId checkpoint, enabling efficient incrementa...

`https://​www.googleapis.com/auth/gmail.metadata`

List Labels`gmail_list_labels`

Retrieve the complete list of Gmail labels in the authenticated user's mailbox, including both built-in system labels an...

`https://​www.googleapis.com/auth/gmail.metadata`

Get Label`gmail_get_label`

Retrieve the complete metadata for a specific Gmail label by its ID, including message and thread counts, sidebar visibi...

`https://​www.googleapis.com/auth/gmail.metadata`

Create Label`gmail_create_label`

Create a new custom Gmail label for organizing email messages, with options to set its display name, sidebar visibility,...

`https://​www.googleapis.com/auth/gmail.labels`

Update Label`gmail_update_label`

Partially update an existing Gmail label's name, visibility settings, or color using a PATCH request that only modifies...

`https://​www.googleapis.com/auth/gmail.labels`

Delete Label`gmail_delete_label`

Permanently remove a custom Gmail label by its ID - all messages that had this label are preserved with the label stripp...

`https://​www.googleapis.com/auth/gmail.labels`

List Messages`gmail_list_messages`

Retrieve a paginated list of email messages from the authenticated user's Gmail mailbox, returning message IDs and threa...

`https://​www.googleapis.com/auth/gmail.metadata`

Get Message`gmail_get_message`

Retrieve the complete content and metadata of a specific Gmail message by its ID, including all headers, body parts, and...

`https://​www.googleapis.com/auth/gmail.readonly`

Send Message`gmail_send_message`

Immediately send a new email message via Gmail by providing the complete RFC 2822 formatted message content encoded as a...

`https://​www.googleapis.com/auth/gmail.send`

Delete Message`gmail_delete_message`

Permanently and irreversibly delete a Gmail message by its ID, bypassing the Trash folder entirely - use trash\_message i...

`https://​mail.google.com/`

Modify Message`gmail_modify_message`

Add or remove Gmail labels on a specific message in a single call to star it, mark it as read or unread, move it to inbo...

`https://​www.googleapis.com/auth/gmail.modify`

Trash Message`gmail_trash_message`

Move a Gmail message to the Trash folder so it can be recovered within 30 days - a safe, reversible alternative to the p...

`https://​www.googleapis.com/auth/gmail.modify`

Untrash Message`gmail_untrash_message`

Restore a previously trashed Gmail message back to the inbox by removing the TRASH label and restoring INBOX, reversing...

`https://​www.googleapis.com/auth/gmail.modify`

List Forwarding Addresses`gmail_list_forwarding_addresses`

Retrieve all email forwarding addresses registered in the Gmail account settings, along with their verification status s...

`https://​www.googleapis.com/auth/gmail.readonly`

Get Forwarding Address`gmail_get_forwarding_address`

Retrieve the details and verification status of a specific email forwarding address registered in Gmail settings, confir...

`https://​www.googleapis.com/auth/gmail.readonly`

Get Auto-Forwarding Settings`gmail_get_auto_forwarding`

Retrieve the current auto-forwarding configuration showing whether all incoming emails are being automatically forwarded...

`https://​www.googleapis.com/auth/gmail.readonly`

Get IMAP Settings`gmail_get_imap_settings`

Retrieve the current IMAP protocol settings for the Gmail account, including whether IMAP access is enabled for third-pa...

`https://​www.googleapis.com/auth/gmail.readonly`

Update IMAP Settings`gmail_update_imap_settings`

Update the Gmail IMAP protocol settings to enable or disable IMAP access for third-party email clients, and configure ho...

`https://​www.googleapis.com/auth/gmail.settings.basic`

Get POP Settings`gmail_get_pop_settings`

Retrieve the current POP3 protocol settings for the Gmail account, showing which messages are accessible via POP3 and wh...

`https://​www.googleapis.com/auth/gmail.readonly`

Update POP Settings`gmail_update_pop_settings`

Update the Gmail POP3 protocol settings to control which messages are downloadable by POP3 clients and what disposition...

`https://​www.googleapis.com/auth/gmail.settings.basic`

List Send-As Aliases`gmail_list_send_as_aliases`

Retrieve all send-as aliases configured for the Gmail account, including the primary address and any additional addresse...

`https://​www.googleapis.com/auth/gmail.readonly`

Get Send-As Alias`gmail_get_send_as_alias`

Retrieve the complete configuration of a specific send-as alias by its email address, including the sender display name,...

`https://​www.googleapis.com/auth/gmail.readonly`

Get Vacation Settings`gmail_get_vacation_settings`

Retrieve the current vacation responder (out-of-office auto-reply) configuration, including whether it is active, the me...

`https://​www.googleapis.com/auth/gmail.readonly`

Update Vacation Settings`gmail_update_vacation_settings`

Enable, disable, or update the Gmail vacation responder (out-of-office auto-reply) with custom message content, an optio...

`https://​www.googleapis.com/auth/gmail.settings.basic`

List Threads`gmail_list_threads`

Search and list email conversation threads from Gmail using full Gmail search syntax, with support for filtering by send...

`https://​www.googleapis.com/auth/gmail.metadata`

Get Thread`gmail_get_thread`

Retrieve the complete email conversation thread including all messages in chronological order, with full MIME content, h...

`https://​www.googleapis.com/auth/gmail.readonly`

Modify Thread`gmail_modify_thread`

Apply or remove Gmail labels on every message in an entire conversation thread simultaneously, enabling efficient bulk o...

`https://​www.googleapis.com/auth/gmail.modify`

Delete Thread`gmail_delete_thread`

Permanently and irreversibly delete an entire email thread and all its messages by thread ID, bypassing Trash - use tras...

`https://​mail.google.com/`

Trash Thread`gmail_trash_thread`

Move an entire email conversation thread and all its messages to the Gmail Trash folder, where it can be recovered withi...

`https://​www.googleapis.com/auth/gmail.modify`

Untrash Thread`gmail_untrash_thread`

Restore a trashed email thread and all its messages back to the inbox by removing the TRASH label and restoring INBOX on...

`https://​www.googleapis.com/auth/gmail.modify`

Get User Profile`gmail_get_user_profile`

Retrieve the authenticated user's Gmail profile including their primary email address, total mailbox message and thread...

`https://​www.googleapis.com/auth/gmail.metadata`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.