Communication
Gmail + AI Agents
Give agents a scoped Gmail inbox — search threads, extract attachments, draft replies, and send templated email on a schedule.
Auth & credentials
OAuth
Google (Gmail — BYO only)
Encrypted at rest, limited to the agents and tools you authorize, and not logged in plaintext.
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.
Triage a label by priority and surface threads that need a reply
Draft and send replies that match the thread context
Extract attachments and parse PDFs (e.g. invoices, expense reports)
Route receipt threads to a Google Sheet and mark them processed
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.
Agents don't just answer chats. They run on a schedule — 24/7 — so Gmail work happens even when you're asleep.
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.
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.
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
5getMessageFetch 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.
getMessageAttachmentFetch a Gmail attachment by messageId + attachmentId. Returns standard base64 bytes (dataBase64).
getMessagesFetch 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.
getThreadFetch 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.
listLabelsList Gmail labels (id + name)
Write & mutating
8batchModifyMessagesBatch add/remove label IDs across multiple message IDs
ensureLabelGet or create a Gmail label by name; returns label object (id + name)
markMessageAsReadMark Gmail message as read (removes UNREAD label)
markMessageAsUnreadMark Gmail message as unread (adds UNREAD label)
modifyMessageLabelsAdd/remove Gmail label IDs on a message. Use removeLabelIds:['UNREAD'] to mark as read.
replyToMessageReply 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.
sendMessageSend 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.
sendMessageWithAttachmentSend 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
- 01
Choose a plan
Starter or Pro. Your managed workspace is ready in seconds.
- 02
Install
Add Gmail from the plugin directory — one click, no config files.
- 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