> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Gmail

The Gmail connector lets your AI agent act in each user's Gmail account. Each user signs in to Gmail once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 48 tools.

**Authentication:** OAuth 2.0
**Categories:** Communication
**Tools:** 48: 21 read, 19 write, 8 destructive
**Users sign in with:** OAuth
**OAuth app:** Your own Google app
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=GMAIL)

## What you can do

- **Read emails**: fetch messages, threads, and attachments from any label or inbox
- **Send and reply**: compose new emails and reply to existing threads on behalf of your users
- **Search messages**: query Gmail with full search syntax to find emails by sender, subject, or content
- **Manage labels**: apply, remove, and list labels to organize messages
- **Access contacts**: look up contacts and people from the user's address book

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Gmail connection

   In **AgentKit > Connections**, create a Gmail connection and copy its redirect URI. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Register a Google OAuth app

   Scalekit credentials aren't available for Gmail. In Google Cloud Console, enable the Gmail API and create an OAuth client ID for a web application, with the redirect URI you copied.

   Then enter the app's Client ID and Client Secret on the Gmail connection.

   **Console steps with screenshots:**

   Register your Scalekit environment with the Gmail connector so Scalekit handles the authentication flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:

   1. ### Set up auth redirects

       - In [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** > **Connections** > **Create Connection**. Find **Gmail** and click **Create**.

         > Scalekit credentials aren't available for Gmail, so register your own OAuth app with the steps below before users can connect.

       - Copy the redirect URI. It looks like `https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback`.

         > Image: Copy redirect URI from Scalekit dashboard

       - Navigate to [Google Cloud Console](https://console.cloud.google.com/projectselector2/home/dashboard?supportedpurview=project) → **APIs & Services** → **Credentials**. Click **+ Create Credentials**, then **OAuth client ID**. Choose **Web application** as the application type.

         > Image: Select Web application in Google Cloud Console

       - Under **Authorized redirect URIs**, click **+ Add URI**, paste the redirect URI, and click **Create**.

         > Image: Add authorized redirect URI in Google Cloud Console

   2. ### Enable Gmail API

       - In [Google Cloud Console](https://console.cloud.google.com/projectselector2/home/dashboard?supportedpurview=project), go to **APIs & Services** → **Library**. Search for "Gmail API" and click **Enable**.

         > Image: Enable Gmail API in Google Cloud Console

   3. ### Get client credentials

       Google provides your Client ID and Client Secret after you create the OAuth client ID in step 1.

   4. ### Add credentials in Scalekit

       - In [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** > **Connections** and open the connection you created.

       - Enter your credentials:
         - Client ID (from above)
         - Client Secret (from above)
         - Permissions (scopes beginning with `gmail` — see [Google API Scopes reference](https://developers.google.com/identity/protocols/oauth2/scopes))

         > Image: Add credentials for Gmail in Scalekit dashboard
       - Click **Save**.

5. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'gmail'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Gmail:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'gmail_fetch_mails',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "gmail"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Gmail:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="gmail_fetch_mails",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'gmail_fetch_mails',
  toolInput: {},
  connector: 'gmail',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="gmail_fetch_mails",
    tool_input={},
    connection_name="gmail",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `gmail_fetch_mails`

Fetch Emails from Gmail · Read-only

Fetch emails from a connected Gmail account using search filters. Requires a valid Gmail OAuth2 connection.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `format` (`string`, optional): Format of the returned message. One of: `minimal`, `full`, `raw`, `metadata`. Default: `metadata`.
- `include_spam_trash` (`boolean`, optional): Whether to fetch emails from spam and trash folders. Default: `false`.
- `label_ids` (`array`, optional): Gmail label IDs to filter messages
- `max_results` (`integer`, optional): Maximum number of emails to fetch
- `page_token` (`string`, optional): Page token for pagination
- `query` (`string`, optional): Search query string using Gmail's search syntax (e.g., 'is:unread from:user@example.com')

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{}`

### `gmail_get_attachment_by_id`

Fetch Attachment by Gmail ID · Read-only

Retrieve a specific attachment from a Gmail message using the message ID and attachment ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `attachment_id` (`string`, required): Unique Gmail attachment ID
- `message_id` (`string`, required): Unique Gmail message ID that contains the attachment
- `file_name` (`string`, optional): Preferred filename to use when saving/returning the attachment

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"attachment_id":"<attachment_id>","message_id":"17a1b2c3d4e5f6g7"}`

### `gmail_get_auto_forwarding`

Get Auto-Forwarding Settings · Read-only

Get the auto-forwarding settings for the authenticated Gmail account, showing whether incoming mail is automatically forwarded to another address and what happens to the local copy. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `gmail_get_contacts`

Fetch Gmail Contacts · Read-only

Fetch a list of contacts from the connected Gmail account. Supports pagination and field filtering.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `max_results` (`integer`, optional): Maximum number of contacts to fetch
- `page_token` (`string`, optional): Token to retrieve the next page of results
- `person_fields` (`array`, optional): Fields to include for each person

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{}`

### `gmail_get_draft`

Get Gmail Draft · Read-only

Retrieve a specific Gmail draft by draft ID. Optionally control the format of the returned message content. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `draft_id` (`string`, required): The Gmail draft ID to retrieve. Obtain this from a list drafts operation. Example: 'r-1234567890123456789'.
- `format` (`string`, optional): The format of the returned draft message. 'full' returns the parsed email with headers and body. 'minimal' returns only IDs and labels. 'raw' returns the full RFC 2822 message as a base64url string. 'metadata' returns headers only. One of: `minimal`, `full`, `raw`, `metadata`.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"draft_id":"r-1234567890123456789"}`

### `gmail_get_filter`

Get Email Filter · Read-only

Get details for a specific email filter in the authenticated Gmail account, including its criteria and actions. Use the List Email Filters tool to find valid filter IDs. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `filter_id` (`string`, required): The Gmail filter ID to retrieve. Obtain this from the List Email Filters tool. Example: 'ANe1BmiXxxxxxx'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"filter_id":"ANe1BmiXxxxxxx"}`

### `gmail_get_forwarding_address`

Get Forwarding Address · Read-only

Get the verification status of a single forwarding address configured for the authenticated Gmail account. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `forwarding_email` (`string`, required): The forwarding email address to look up. Use List Forwarding Addresses to find configured addresses.

Example input: `{"forwarding_email":"<forwarding_email>"}`

### `gmail_get_label`

Get Gmail Label · Read-only

Get details for a specific Gmail label, including its name, type, and visibility settings. Use the List Labels tool to find valid label IDs. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `label_id` (`string`, required): The Gmail label ID to retrieve. Use system labels such as 'INBOX', 'STARRED', 'IMPORTANT', or a custom label ID obtained from the List Labels tool. Example: 'Label_123'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"label_id":"Label_123"}`

### `gmail_get_message_by_id`

Fetch Message by Gmail ID · Read-only

Retrieve a specific Gmail message using its message ID. Optionally control the format of the returned data.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `message_id` (`string`, required): Unique Gmail message ID
- `format` (`string`, optional): Format of the returned message. One of: `minimal`, `full`, `raw`, `metadata`.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"message_id":"17a1b2c3d4e5f6g7"}`

### `gmail_get_profile`

Get Gmail Profile · Read-only

Get the Gmail profile for the authenticated user, including their email address, total message count, thread count, and current history ID. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{}`

### `gmail_get_send_as`

Get Send-As Alias · Read-only

Get send-as alias settings including email signature for the authenticated Gmail account. Use the user's own email address to retrieve the default send-as settings and signature. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `send_as_email` (`string`, required): The send-as alias email address to retrieve settings for. Use the user's own email address (e.g., 'user@example.com') to get their default signature and send-as settings.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"send_as_email":"user@example.com"}`

### `gmail_get_thread_by_id`

Get Gmail Thread by ID · Read-only

Retrieve a specific Gmail thread by thread ID. Optionally control message format and metadata headers. Requires a valid Gmail OAuth2 connection with read access.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `thread_id` (`string`, required): Unique Gmail thread ID
- `format` (`string`, optional): Format of messages in the returned thread. One of: `full`, `metadata`, `minimal`. Default: `full`.
- `metadata_headers` (`array`, optional): Specific email headers to include when format is metadata

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"thread_id":"17a1b2c3d4e5f6g7"}`

### `gmail_get_vacation_settings`

Get Vacation Settings · Read-only

Get the vacation auto-reply settings for the authenticated Gmail account. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{}`

### `gmail_list_drafts`

List Gmail Drafts · Read-only

List draft emails from a connected Gmail account. Requires a valid Gmail OAuth2 connection.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `max_results` (`integer`, optional): Maximum number of drafts to fetch
- `page_token` (`string`, optional): Page token for pagination

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{}`

### `gmail_list_filters`

List Email Filters · Read-only

List all email filters for the authenticated Gmail account. Returns filter criteria and actions such as label assignment, forwarding, and archiving rules. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{}`

### `gmail_list_forwarding_addresses`

List Forwarding Addresses · Read-only

List all forwarding addresses configured for the authenticated Gmail account, including their verification status. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `gmail_list_history`

List History · Read-only

List the history of changes (messages added, deleted, or labels changed) to a Gmail mailbox since a given historyId. Used together with watch_mailbox to keep an external system in sync with mailbox changes without polling the full mailbox. History is only retained for a limited time, so a gap since the last known historyId may require a full resync.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `start_history_id` (`string`, required): Required. Returns history records after this historyId. Obtain this from the historyId field of a previous message/thread/profile response or a watch_mailbox notification.
- `history_types` (`array`, optional): History types to return. Valid values: messageAdded, messageDeleted, labelAdded, labelRemoved. Omit to return all types.
- `label_id` (`string`, optional): Only return history records that concern this label ID.
- `max_results` (`integer`, optional): Maximum number of history records to return per page.
- `page_token` (`string`, optional): Page token for pagination, from a previous list_history response.

Example input: `{"start_history_id":"<start_history_id>"}`

### `gmail_list_labels`

List Gmail Labels · Read-only

List all labels (system and user-created) in the authenticated Gmail account. Returns label IDs, names, and visibility settings that can be used with message and filter operations. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{}`

### `gmail_list_send_as`

List Send-As Aliases · Read-only

List all send-as aliases (including the primary address) configured for the authenticated Gmail account, showing each alias's display name, signature, and verification status. Uses OAuth credentials.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `gmail_list_threads`

List Gmail Threads · Read-only

List threads in a connected Gmail account using optional search and label filters. Requires a valid Gmail OAuth2 connection with read access.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `include_spam_trash` (`boolean`, optional): Whether to include threads from Spam and Trash. Default: `false`.
- `label_ids` (`array`, optional): Gmail label IDs to filter threads (threads must match all labels)
- `max_results` (`integer`, optional): Maximum number of threads to return
- `page_token` (`string`, optional): Page token for pagination
- `query` (`string`, optional): Search query string using Gmail search syntax (for example, 'is:unread from:user@example.com')

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{}`

### `gmail_search_people`

Search People in Google · Read-only

Search people or contacts in the connected Google account using a query. Requires a valid Google OAuth2 connection with People API scopes.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, required): Text query to search people (e.g., name, email address).
- `other_contacts` (`boolean`, optional): Whether to include people not in the user's contacts (from 'Other Contacts'). Default: `false`.
- `page_size` (`integer`, optional): Maximum number of people to return.
- `person_fields` (`array`, optional): Fields to retrieve for each person.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"query":"is:unread from:user@example.com"}`

### `gmail_batch_modify_messages`

Batch Modify Gmail Messages · Write

Add or remove labels on up to 1000 Gmail messages in a single batch request. Use label IDs such as 'INBOX', 'UNREAD', 'STARRED', 'IMPORTANT', 'TRASH', 'SPAM', or custom label IDs. At least one of add_label_ids or remove_label_ids should be provided. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `message_ids` (`array`, required): List of Gmail message IDs to modify labels on, up to 1000 per request. Obtain these from a list or search messages operation. Example: ["17a1b2c3d4e5f6g7", "17a1b2c3d4e5f6g8"].
- `add_label_ids` (`array`, optional): List of label IDs to add to each message. Use system labels such as 'INBOX', 'UNREAD', 'STARRED', 'IMPORTANT', or custom label IDs retrieved from the Labels API. Example: ["STARRED", "INBOX"].
- `remove_label_ids` (`array`, optional): List of label IDs to remove from each message. Use system labels such as 'UNREAD', 'STARRED', 'INBOX', or custom label IDs. Example: ["UNREAD"].

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"message_ids":["17a1b2c3d4e5f6g7","17a1b2c3d4e5f6g8"]}`

### `gmail_create_draft`

Create Gmail Draft · Write

Create a new draft email in Gmail for the authenticated user. Constructs a MIME message and saves it as a draft. Supports plain text and HTML content types, CC, BCC, and threading. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `body` (`string`, required): The body content of the draft email. Provide plain text or HTML depending on the content_type field. Example: 'Hello, this is my draft message.'
- `subject` (`string`, required): The subject line of the draft email. Example: 'Meeting Follow-up'.
- `to` (`string`, required): The recipient email address(es) for the draft. Provide a single address or comma-separated list. Example: 'recipient@example.com' or 'a@example.com,b@example.com'.
- `bcc` (`string`, optional): BCC recipients for the draft email. Provide a comma-separated list of email addresses, e.g., bcc1@example.com,bcc2@example.com. Optional.
- `cc` (`string`, optional): CC recipients for the draft email. Provide a comma-separated list of email addresses, e.g., cc1@example.com,cc2@example.com. Optional.
- `content_type` (`string`, optional): The MIME content type for the email body. Use 'text/plain' for plain text or 'text/html' for HTML content. Defaults to 'text/plain'. One of: `text/plain`, `text/html`. Default: `text/plain`.
- `thread_id` (`string`, optional): The Gmail thread ID to associate this draft with an existing conversation. If provided, the draft will be part of that thread. Example: '17a1b2c3d4e5f6g7'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"body":"Hello, this is my draft message.","subject":"Meeting Follow-up","to":"recipient@example.com"}`

### `gmail_create_filter`

Create Email Filter · Write

Create a new email filter for the authenticated Gmail account. Specify criteria (sender, recipient, subject, query, or attachment) and actions (apply labels, forward, archive, star, trash, mark as read, etc.). At least one criteria field should be provided. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `add_label_ids` (`array`, optional): List of Gmail label IDs to apply to matching messages (e.g., ['Label_123', 'STARRED']). Use the List Labels tool to find valid label IDs.
- `forward` (`string`, optional): Email address to forward matching messages to. The address must already be configured as a forwarding address in the Gmail account.
- `from` (`string`, optional): Sender email address or domain to match in the filter criteria (e.g., 'alerts@github.com' or '@newsletter.com').
- `has_attachment` (`boolean`, optional): If true, only match messages that have at least one attachment.
- `query` (`string`, optional): Gmail search query string to match messages using Gmail's search syntax (e.g., 'larger:10M', 'is:important').
- `remove_label_ids` (`array`, optional): List of Gmail label IDs to remove from matching messages (e.g., ['INBOX'] to archive, ['UNREAD'] to mark as read).
- `should_always_mark_important` (`boolean`, optional): If true, always mark matching messages as important regardless of Gmail's automatic importance detection.
- `should_archive` (`boolean`, optional): If true, skip the inbox for matching messages (equivalent to adding the 'Archive' action).
- `should_mark_read` (`boolean`, optional): If true, automatically mark matching messages as read.
- `should_never_mark_important` (`boolean`, optional): If true, never mark matching messages as important, overriding Gmail's automatic importance detection.
- `should_never_spam` (`boolean`, optional): If true, never send matching messages to the Spam folder.
- `should_star` (`boolean`, optional): If true, automatically star matching messages.
- `should_trash` (`boolean`, optional): If true, automatically move matching messages to the Trash.
- `subject` (`string`, optional): Subject line text to match in the filter criteria (e.g., '[GitHub]' or 'Invoice').
- `to` (`string`, optional): Recipient email address to match in the filter criteria (e.g., 'team@example.com').

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{}`

### `gmail_create_label`

Create Gmail Label · Write

Create a new user label in the authenticated Gmail account. Labels can be applied to messages for organization and are visible in the Gmail label list and message list based on the visibility settings. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): The display name of the new label. Must be unique within the account. Example: 'Follow Up'.
- `label_list_visibility` (`string`, optional): Controls whether the label is shown in the Gmail label list. Use 'labelShow' to always show, 'labelShowIfUnread' to show only when it has unread messages, or 'labelHide' to hide it. Defaults to 'labelShow'. One of: `labelShow`, `labelShowIfUnread`, `labelHide`. Default: `labelShow`.
- `message_list_visibility` (`string`, optional): Controls whether the label is shown in the message list. Use 'show' to display it or 'hide' to conceal it. Defaults to 'show'. One of: `show`, `hide`. Default: `show`.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"name":"Follow Up"}`

### `gmail_import_message`

Import Message · Write

Import an RFC 822 message into the authenticated Gmail mailbox using the standard receiving pipeline: spam classification and matching filters are applied, unlike gmail_insert_message which bypasses that pipeline. Intended for migrating existing messages that already have their own headers (From, Date, Message-ID, etc.).

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `raw_message` (`string`, required): The full RFC 822 formatted message source, including headers (From, To, Subject, Date, etc.) and body, exactly as it should appear in the mailbox. This is base64url-encoded automatically before sending.
- `deleted` (`boolean`, optional): Mark the imported message as immediately deleted (moved to Trash), e.g. to preserve a copy of a message that a delete-message policy already removed elsewhere.
- `internal_date_source` (`string`, optional): Source used to determine the message's internal (received) date shown in Gmail. 'dateHeader' uses the Date header from raw_message; 'receivedTime' uses the time this API call was made. Defaults to dateHeader. One of: `dateHeader`, `receivedTime`.
- `label_ids` (`array`, optional): Label IDs to apply to the imported message. Example: ["INBOX", "UNREAD"].
- `never_mark_spam` (`boolean`, optional): If true, the message is never marked as SPAM in the resulting thread, even if Gmail's spam classifier would otherwise flag it.
- `process_for_calendar` (`boolean`, optional): If true, and the message contains a calendar invite, process the invite to add an entry to the user's calendar.

Example input: `{"raw_message":"<raw_message>"}`

### `gmail_insert_message`

Insert Message · Write

Directly insert a fully-formed RFC 822 message into the authenticated Gmail mailbox without sending it and without running it through Gmail's normal receiving pipeline (no spam filtering, no user filters applied). Intended for migrating or restoring existing messages that already have their own headers (From, Date, Message-ID, etc.), unlike send_message which composes a new outgoing email. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `raw_message` (`string`, required): The full RFC 822 formatted message source, including headers (From, To, Subject, Date, etc.) and body, exactly as it should appear in the mailbox. This is base64url-encoded automatically before sending.
- `internal_date_source` (`string`, optional): Source used to determine the message's internal (received) date shown in Gmail. 'dateHeader' uses the Date header from raw_message; 'receivedTime' uses the time this API call was made. Defaults to dateHeader. One of: `dateHeader`, `receivedTime`.
- `label_ids` (`array`, optional): Label IDs to apply to the inserted message. Example: ["INBOX", "UNREAD"].

Example input: `{"raw_message":"<raw_message>"}`

### `gmail_modify_message_labels`

Modify Gmail Message Labels · Write

Add or remove labels on a Gmail message. Use label IDs such as 'INBOX', 'UNREAD', 'STARRED', 'IMPORTANT', 'TRASH', 'SPAM', or custom label IDs. At least one of add_label_ids or remove_label_ids should be provided. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `message_id` (`string`, required): The Gmail message ID whose labels will be modified. Obtain this from a list or search messages operation. Example: '17a1b2c3d4e5f6g7'.
- `add_label_ids` (`array`, optional): List of label IDs to add to the message. Use system labels such as 'INBOX', 'UNREAD', 'STARRED', 'IMPORTANT', or custom label IDs retrieved from the Labels API. Example: ["STARRED", "INBOX"].
- `remove_label_ids` (`array`, optional): List of label IDs to remove from the message. Use system labels such as 'UNREAD', 'STARRED', 'INBOX', or custom label IDs. Example: ["UNREAD"].

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"message_id":"17a1b2c3d4e5f6g7"}`

### `gmail_modify_thread_labels`

Modify Thread Labels · Write

Add or remove Gmail labels across every message in a thread at once, applying the change consistently to the whole conversation instead of one message at a time. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `thread_id` (`string`, required): The Gmail thread ID whose messages should be relabeled.
- `add_label_ids` (`array`, optional): Label IDs to add to every message in the thread.
- `remove_label_ids` (`array`, optional): Label IDs to remove from every message in the thread.

Example input: `{"thread_id":"17a1b2c3d4e5f6g7"}`

### `gmail_reply_to_thread`

Reply to Gmail Thread · Write

Send a reply within an existing Gmail thread. Constructs a MIME message, optionally sets In-Reply-To and References headers to properly thread the reply against the original message, and sends it as part of the given thread. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `body` (`string`, required): The body content of the reply. Provide plain text or HTML depending on the content_type field. Example: 'Thanks for the update, sounds good.'
- `thread_id` (`string`, required): The Gmail thread ID to reply within. Obtain this from a list or search messages/threads operation. Example: '17a1b2c3d4e5f6g7'.
- `to` (`string`, required): The recipient email address(es) for the reply. Provide a single address or comma-separated list. Example: 'recipient@example.com' or 'a@example.com,b@example.com'.
- `bcc` (`string`, optional): BCC recipients for the reply. Provide a comma-separated list of email addresses, e.g., bcc1@example.com,bcc2@example.com. Optional.
- `cc` (`string`, optional): CC recipients for the reply. Provide a comma-separated list of email addresses, e.g., cc1@example.com,cc2@example.com. Optional.
- `content_type` (`string`, optional): The MIME content type for the reply body. Use 'text/plain' for plain text or 'text/html' for HTML content. Defaults to 'text/plain'. One of: `text/plain`, `text/html`. Default: `text/plain`.
- `in_reply_to_message_id` (`string`, optional): The RFC822 Message-ID header value of the message being replied to. Used to set the In-Reply-To and References headers so mail clients thread the reply correctly. Example: '<abc123@mail.gmail.com>'.
- `subject` (`string`, optional): The subject line of the reply. If omitted, defaults to 'Re:'. It's recommended to pass the original subject prefixed with 'Re: ', e.g., 'Re: Meeting Follow-up'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"body":"Thanks for the update, sounds good.","thread_id":"17a1b2c3d4e5f6g7","to":"recipient@example.com"}`

### `gmail_send_draft`

Send Gmail Draft · Write

Send an existing draft email from the authenticated Gmail account. The draft is removed from Drafts and delivered as a sent message. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `draft_id` (`string`, required): The Gmail draft ID to send. Obtain this from a list drafts or create draft operation. Example: 'r-1234567890123456789'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"draft_id":"r-1234567890123456789"}`

### `gmail_send_message`

Send Gmail Message · Write

Send an email message immediately from the authenticated Gmail account. Constructs a MIME message and sends it via the Gmail API. Supports plain text and HTML content types, CC, BCC, and attaching the message to an existing thread. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `body` (`string`, required): The body content of the email. Provide plain text or HTML depending on the content_type field. Example: 'Hello, this is my message.'
- `subject` (`string`, required): The subject line of the email. Example: 'Meeting Follow-up'.
- `to` (`string`, required): The recipient email address(es) for the message. Provide a single address or comma-separated list. Example: 'recipient@example.com' or 'a@example.com,b@example.com'.
- `bcc` (`string`, optional): BCC recipients for the email. Provide a comma-separated list of email addresses, e.g., bcc1@example.com,bcc2@example.com. Optional.
- `cc` (`string`, optional): CC recipients for the email. Provide a comma-separated list of email addresses, e.g., cc1@example.com,cc2@example.com. Optional.
- `content_type` (`string`, optional): The MIME content type for the email body. Use 'text/plain' for plain text or 'text/html' for HTML content. Defaults to 'text/plain'. One of: `text/plain`, `text/html`. Default: `text/plain`.
- `thread_id` (`string`, optional): The Gmail thread ID to associate this sent message with an existing conversation. If provided, the message is added to that thread. Example: '17a1b2c3d4e5f6g7'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"body":"Hello, this is my message.","subject":"Meeting Follow-up","to":"recipient@example.com"}`

### `gmail_stop_mailbox_watch`

Stop Gmail Mailbox Watch · Write

Stop receiving push notifications for the current Gmail mailbox by canceling any active watch registered via gmail_watch_mailbox. This operation is idempotent — calling it when no watch is active is a no-op. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{}`

### `gmail_untrash_message`

Untrash Gmail Message · Write

Remove a Gmail message from Trash and restore it to its previous location. This operation is idempotent — untrashing a message that is not in Trash is a no-op. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `message_id` (`string`, required): The Gmail message ID to remove from Trash. Obtain this from a list or search messages operation. Example: '17a1b2c3d4e5f6g7'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"message_id":"17a1b2c3d4e5f6g7"}`

### `gmail_untrash_thread`

Untrash Thread · Write

Remove an entire Gmail thread from Trash, restoring it and its messages to their prior location. Idempotent — untrashing a thread that isn't in Trash is a no-op. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `thread_id` (`string`, required): The Gmail thread ID to remove from Trash.

Example input: `{"thread_id":"17a1b2c3d4e5f6g7"}`

### `gmail_update_draft`

Update Gmail Draft · Write

Replace the content of an existing Gmail draft. Constructs a new MIME message and overwrites the draft identified by draft_id. Supports plain text and HTML content types, CC, BCC, and threading. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `body` (`string`, required): The body content of the draft email. Provide plain text or HTML depending on the content_type field. Example: 'Hello, this is my updated draft message.'
- `draft_id` (`string`, required): The Gmail draft ID to update. Obtain this from a list drafts or create draft operation. Example: 'r-1234567890123456789'.
- `subject` (`string`, required): The subject line of the draft email. Example: 'Meeting Follow-up (updated)'.
- `to` (`string`, required): The recipient email address(es) for the draft. Provide a single address or comma-separated list. Example: 'recipient@example.com' or 'a@example.com,b@example.com'.
- `bcc` (`string`, optional): BCC recipients for the draft email. Provide a comma-separated list of email addresses, e.g., bcc1@example.com,bcc2@example.com. Optional.
- `cc` (`string`, optional): CC recipients for the draft email. Provide a comma-separated list of email addresses, e.g., cc1@example.com,cc2@example.com. Optional.
- `content_type` (`string`, optional): The MIME content type for the email body. Use 'text/plain' for plain text or 'text/html' for HTML content. Defaults to 'text/plain'. One of: `text/plain`, `text/html`. Default: `text/plain`.
- `thread_id` (`string`, optional): The Gmail thread ID to associate this draft with an existing conversation. If provided, the draft will be part of that thread. Example: '17a1b2c3d4e5f6g7'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"body":"Hello, this is my updated draft message.","draft_id":"r-1234567890123456789","subject":"Meeting Follow-up (updated)","to":"recipient@example.com"}`

### `gmail_update_label`

Update Gmail Label · Write

Update an existing user label in the authenticated Gmail account. Change the label name or its visibility in the label list and message list. Use the List Labels tool to find the label ID. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `label_id` (`string`, required): The Gmail label ID to update. Use a custom label ID obtained from the List Labels tool. Example: 'Label_123'.
- `label_list_visibility` (`string`, optional): Controls whether the label is shown in the Gmail label list. Use 'labelShow' to always show, 'labelShowIfUnread' to show only when it has unread messages, or 'labelHide' to hide it. One of: `labelShow`, `labelShowIfUnread`, `labelHide`.
- `message_list_visibility` (`string`, optional): Controls whether the label is shown in the message list. Use 'show' to display it or 'hide' to conceal it. One of: `show`, `hide`.
- `name` (`string`, optional): The new display name for the label. Must be unique within the account. Example: 'Follow Up - Urgent'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"label_id":"Label_123"}`

### `gmail_update_send_as`

Update Send-As Alias · Write

Update send-as alias settings such as the email signature, display name, or reply-to address for the authenticated Gmail account. Use the user's own email address to update their default signature. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `send_as_email` (`string`, required): The send-as alias email address to update. Use the user's own email address (e.g., 'user@example.com') to update their default signature and settings.
- `display_name` (`string`, optional): The display name shown as the sender name for this alias (e.g., 'Jane Smith').
- `is_default` (`boolean`, optional): If true, sets this send-as alias as the default address used when composing new messages.
- `reply_to_address` (`string`, optional): An optional email address that appears in the Reply-To header for messages sent from this alias (e.g., 'replies@example.com').
- `signature` (`string`, optional): HTML email signature to set for this alias. Supports full HTML markup (e.g., '<b>Jane Smith</b><br>Senior Engineer').

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"send_as_email":"user@example.com"}`

### `gmail_update_vacation_settings`

Update Vacation Settings · Write

Update the vacation auto-reply settings for the authenticated Gmail account. Set enableAutoReply to true to activate out-of-office responses. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `enable_auto_reply` (`boolean`, required): Whether to enable the vacation auto-reply. Set to true to turn on out-of-office responses, false to disable.
- `end_time` (`string`, optional): End time for the vacation auto-reply as epoch milliseconds in string format (e.g., '1754006400000'). After this time, auto-reply stops.
- `response_body_html` (`string`, optional): HTML body of the vacation auto-reply message. If both plain text and HTML are provided, HTML takes precedence for clients that support it.
- `response_body_plain_text` (`string`, optional): Plain text body of the vacation auto-reply message.
- `response_subject` (`string`, optional): Subject line of the vacation auto-reply email (e.g., 'Out of Office: Back on Monday').
- `restrict_to_contacts` (`boolean`, optional): If true, only contacts in the user's Google Contacts will receive the auto-reply. Default is false. Default: `false`.
- `restrict_to_domain` (`boolean`, optional): If true, only users in the same Google Workspace domain will receive the auto-reply. Default is false. Default: `false`.
- `start_time` (`string`, optional): Start time for the vacation auto-reply as epoch milliseconds in string format (e.g., '1753401600000'). Auto-reply activates from this time.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"enable_auto_reply":true}`

### `gmail_watch_mailbox`

Watch Gmail Mailbox · Write

Set up push notifications for changes to a Gmail mailbox by registering a Google Cloud Pub/Sub topic. Gmail publishes a notification to the topic whenever the mailbox's history changes. Each call replaces any existing watch and the watch expires after 7 days, so it must be renewed periodically. Uses OAuth credentials.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `topic_name` (`string`, required): The full Cloud Pub/Sub topic name to publish mailbox change notifications to. Must be in the format 'projects/{project}/topics/{topic}'. Example: 'projects/myproject/topics/mytopic'.
- `label_filter_behavior` (`string`, optional): Whether label_ids should be used to INCLUDE (restrict notifications to only these labels) or EXCLUDE (notify on all labels except these) label changes. Only used when label_ids is provided. Defaults to INCLUDE. One of: `INCLUDE`, `EXCLUDE`.
- `label_ids` (`array`, optional): List of label IDs to restrict notifications to (or exclude from, depending on label_filter_behavior). Example: ["INBOX"]. If omitted, all mailbox changes trigger notifications.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"topic_name":"projects/myproject/topics/mytopic"}`

### `gmail_batch_delete_messages`

Batch Delete Gmail Messages · Destructive

Permanently delete up to 1000 Gmail messages in a single batch request. This bypasses Trash entirely — the messages are immediately and permanently removed and CANNOT be recovered. Use gmail_trash_message or gmail_batch_modify_messages (with TRASH label) instead if the deletion should be reversible. Uses OAuth credentials.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `message_ids` (`array`, required): List of Gmail message IDs to permanently delete, up to 1000 per request. Obtain these from a list or search messages operation. Example: ["17a1b2c3d4e5f6g7", "17a1b2c3d4e5f6g8"]. WARNING: this permanently deletes the messages; they cannot be recovered.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"message_ids":["17a1b2c3d4e5f6g7","17a1b2c3d4e5f6g8"]}`

### `gmail_delete_draft`

Delete Gmail Draft · Destructive

Permanently delete a Gmail draft. This is a permanent removal and does not send the draft or move it to Trash for recovery. Uses OAuth credentials.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `draft_id` (`string`, required): The Gmail draft ID to permanently delete. Obtain this from a list drafts operation. Example: 'r-1234567890123456789'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"draft_id":"r-1234567890123456789"}`

### `gmail_delete_filter`

Delete Email Filter · Destructive

Permanently delete an email filter from the authenticated Gmail account. This does not affect messages already processed by the filter. Use the List Email Filters tool to find the filter ID. Uses OAuth credentials.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `filter_id` (`string`, required): The Gmail filter ID to permanently delete. Obtain this from the List Email Filters tool. Example: 'ANe1BmiXxxxxxx'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"filter_id":"ANe1BmiXxxxxxx"}`

### `gmail_delete_label`

Delete Gmail Label · Destructive

Permanently delete a user label from the authenticated Gmail account. This removes the label from all messages it was applied to and cannot be undone. Use the List Labels tool to find the label ID. Uses OAuth credentials.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `label_id` (`string`, required): The Gmail label ID to permanently delete. Use a custom label ID obtained from the List Labels tool. Example: 'Label_123'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"label_id":"Label_123"}`

### `gmail_delete_message`

Delete Gmail Message · Destructive

Permanently delete a single Gmail message. This bypasses Trash entirely — the message is immediately and permanently removed and CANNOT be recovered. Use gmail_trash_message instead if the deletion should be reversible. Uses OAuth credentials.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `message_id` (`string`, required): The Gmail message ID to permanently delete. Obtain this from a list or search messages operation. Example: '17a1b2c3d4e5f6g7'. WARNING: this permanently deletes the message; it cannot be recovered.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"message_id":"17a1b2c3d4e5f6g7"}`

### `gmail_delete_thread`

Delete Thread · Destructive

Permanently and immediately delete a Gmail thread and all of its messages, bypassing Trash. This cannot be undone — prefer trash_thread unless permanent deletion is specifically required. Uses OAuth credentials.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `thread_id` (`string`, required): The Gmail thread ID to permanently delete.

Example input: `{"thread_id":"17a1b2c3d4e5f6g7"}`

### `gmail_trash_message`

Trash Gmail Message · Destructive

Move a Gmail message to the Trash. The message is not permanently deleted and can be recovered from Trash within 30 days. This operation is idempotent — trashing an already-trashed message is a no-op. Uses OAuth credentials.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `message_id` (`string`, required): The Gmail message ID to move to Trash. Obtain this from a list or search messages operation. Example: '17a1b2c3d4e5f6g7'.

Also accepts `schema_version` and `tool_version` to pin a version.

Example input: `{"message_id":"17a1b2c3d4e5f6g7"}`

### `gmail_trash_thread`

Trash Thread · Destructive

Move an entire Gmail thread (all its messages) to Trash. The thread is not permanently deleted and can be recovered from Trash within 30 days. Idempotent — trashing an already-trashed thread is a no-op. Uses OAuth credentials.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `thread_id` (`string`, required): The Gmail thread ID to move to Trash. Obtain this from a list or search threads operation.

Example input: `{"thread_id":"17a1b2c3d4e5f6g7"}`

## Workflows

**Use Gmail response fields as returned**

Response fields from Gmail tools use camelCase, such as `threadId`, `messageId`, and `internalDate`. Tool input parameters use the snake_case names shown in the Tool list, such as `thread_id` and `message_id`. Extract values with camelCase, then pass them with snake_case.

  **Node.js**

  ```typescript
  const fetchResponse = await actions.executeTool({
    connector: 'gmail',
    identifier: 'user_123',
    toolName: 'gmail_fetch_mails',
    toolInput: {
      query: 'is:unread',
      max_results: 5,
    },
  });

  const messages = Array.isArray(fetchResponse.data?.messages)
    ? fetchResponse.data.messages
    : [];
  const threadId = typeof messages[0]?.threadId === 'string' ? messages[0].threadId : '';

  if (threadId) {
    const threadResponse = await actions.executeTool({
      connector: 'gmail',
      identifier: 'user_123',
      toolName: 'gmail_get_thread_by_id',
      toolInput: {
        thread_id: threadId,
      },
    });
    console.log(threadResponse.data);
  }
  ```

  **Python**

  ```python
  fetch_response = actions.execute_tool(
      connection_name='gmail',
      identifier='user_123',
      tool_name="gmail_fetch_mails",
      tool_input={
          "query": "is:unread",
          "max_results": 5,
      },
  )

  data = fetch_response.data or {}
  messages = data.get("messages", [])
  thread_id = messages[0].get("threadId", "") if messages else ""

  if thread_id:
      thread_response = actions.execute_tool(
          connection_name='gmail',
          identifier='user_123',
          tool_name="gmail_get_thread_by_id",
          tool_input={
              "thread_id": thread_id,
          },
      )
      print(thread_response.data)
  ```

**Proxy API call**

  **Node.js**

  ```typescript
  const result = await actions.request({
    connectionName: 'gmail',
    identifier: 'user_123',
    path: '/gmail/v1/users/me/profile',
    method: 'GET',
  });
  console.log(result);
  ```

  **Python**

  ```python
  result = actions.request(
      connection_name='gmail',
      identifier='user_123',
      path="/gmail/v1/users/me/profile",
      method="GET",
  )
  print(result)
  ```

**Google OAuth consent screen verification**

Before you use your own Google OAuth credentials in production, understand what end users see on Google's consent screen when they authorize a connected account.

| Audience type | Consent screen behavior | When to use |
| --- | --- | --- |
| **Internal** | Shows your App Name and logo from Branding settings | Only users in your Google Workspace or Cloud Identity organization can authorize the connector |
| **External** | Shows `{env_name}.scalekit.dev` until Google verifies your app | Any user with a Google account can authorize the connector |

**Why External is required for most AgentKit connectors:**

- **Internal** restricts authorization to users in your Google Workspace or Cloud Identity organization. Users with `@gmail.com` or other Google accounts outside your organization cannot complete OAuth.
- **External** is required when end users outside your organization authorize tool access through connected accounts.
- **Organization-managed OAuth clients follow the same rules** as personal or developer OAuth clients. Switching to an org-owned client does not bypass Google verification.
- Until Google completes verification of your External app, users see `scalekit.dev` on the consent screen. After verification, your App Name and logo appear.

> note: Separate from Scalekit domain verification
>
> This is Google's OAuth consent screen behavior—not Scalekit's. [Custom domain](/agentkit/advanced/custom-domain/) controls your Scalekit environment URL for MCP auth branding. It does not replace Google's app verification for OAuth consent screens.

**During development:**

- Add **Test users** under **APIs & Services → OAuth consent screen** while publishing status is **Testing**.
- On unverified apps, users can click **Advanced → Go to app (unsafe)** to proceed during testing.
- Google Workspace admins may need to allowlist your OAuth client.

For Google's verification requirements and timeline, refer to [Google's OAuth consent screen verification guide](https://support.google.com/cloud/answer/13463073).

## Related

Other Communication connectors ([all 79](/agentkit/connectors/?category=communication)):

- [Crisp](/agentkit/connectors/crisp/): Scalekit connector, API key, 50 tools
- [Google Calendar](/agentkit/connectors/googlecalendar/): Scalekit connector, OAuth, 30 tools
- [Slack](/agentkit/connectors/slack/): Scalekit connector, OAuth, 96 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
