Plugin directory

Communication

Gmail + AI Agents

Give agents a scoped Gmail inbox — search threads, extract attachments, draft replies, and send templated email on a schedule.

Auth: OAuthv1.0.1
emailgoogle
Install

Auth & credentials

Auth method

OAuth

Google (Gmail — BYO only)

Storage

Encrypted at rest, limited to the agents and tools you authorize, and not logged in plaintext.

Scope

Enable Gmail only for the agents that need it.

Connect: Restricted scope: paste your own Google OAuth client JSON (no one-click connect). Grant the https://mail.google.com/ scope. Can be shared with google-sheets/google-tasks.

What it touches: Read, modify labels on, and send Gmail messages via a restricted OAuth scope. Reading and labeling are reversible; sending and replying are mutating.

What your agents can do with Gmail

Concrete jobs an agent team handles with Gmail, each running on a schedule or on demand.

Capability

Triage a label by priority and surface threads that need a reply

Capability

Draft and send replies that match the thread context

Capability

Extract attachments and parse PDFs (e.g. invoices, expense reports)

Capability

Route receipt threads to a Google Sheet and mark them processed

Capability

Send templated notifications or reports with attachments

Built for agent teams

Every OrgSDK integration ships with the same guarantees — this is what makes Gmail useful, not just connected.

Runs on a schedule

Agents don't just answer chats. They run on a schedule — 24/7 — so Gmail work happens even when you're asleep.

Approval gates

Agents can hold any irreversible Gmail step behind a human sign-off using the built-in approval action. Add it to a workflow where it matters — approvals are an explicit capability, not enforced on every call.

Per-agent enable

Grant Gmail only to the agents that need it. Credentials are encrypted at rest and surfaced only through an agent's enabled plugin functions when a workflow needs them.

Encrypted at rest

Your Gmail credentials are encrypted and stored per-org. OrgSDK never reads or logs them in plaintext.

Capability safety — 13 actions

Grouped from each function's source metadata. Read-only actions are non-mutating; write actions create, update, or delete data.

Read-only · non-mutating

5
getMessage

Fetch a single Gmail message by ID. Returns cleaned text body optimized for LLM processing. HTML is converted to clean text, tracking pixels and quoted chains are removed.

getMessageAttachment

Fetch a Gmail attachment by messageId + attachmentId. Returns standard base64 bytes (dataBase64).

getMessages

Fetch Gmail messages using Gmail search query syntax (q). Label filters must use the label name (not the label ID), e.g. label:Expense or label:"Expense Reports". Returns cleaned text body optimized for LLM processing. HTML is converted to clean text, tracking pixels and quoted chains are removed.

getThread

Fetch all messages in a Gmail thread by threadId, in chronological order. Unlike getMessages, this preserves quoted reply chains so the full conversation context is available. Use this before replying to understand the complete thread history.

listLabels

List Gmail labels (id + name)

Write & mutating

8
batchModifyMessages

Batch add/remove label IDs across multiple message IDs

ensureLabel

Get or create a Gmail label by name; returns label object (id + name)

markMessageAsRead

Mark Gmail message as read (removes UNREAD label)

markMessageAsUnread

Mark Gmail message as unread (adds UNREAD label)

modifyMessageLabels

Add/remove Gmail label IDs on a message. Use removeLabelIds:['UNREAD'] to mark as read.

replyToMessage

Reply to a Gmail message within its thread. Fetches the original message to set threading headers (In-Reply-To, References) and replies to the original sender. Supports HTML via multipart/alternative when html parameter is provided.

sendMessage

Send an email via Gmail. Supports plain-text or HTML body. When html is provided, sends a multipart/alternative message with both text/plain and text/html parts.

sendMessageWithAttachment

Send an email with file attachments via Gmail. Builds a MIME multipart/mixed message with a plain-text or HTML body and one or more base64-encoded attachments. When html is provided, the body is nested in multipart/alternative.

How install works

Plans start at $58/mo. Every org runs in its own isolated cloud environment.
  1. 01

    Choose a plan

    Starter or Pro. Your managed workspace is ready in seconds.

  2. 02

    Install

    Add Gmail from the plugin directory — one click, no config files.

  3. 03

    Connect & enable

    Authorize Gmail, then enable it for the agents that need it.

Put Gmail in the hands of a persistent agent team.

Choose Starter or Pro, create your org, and install Gmail in minutes.

Get started