WorkerKit

AI workers for Gmail

Ready-made AI workers for Gmail: overnight inbox triage, follow-ups that chase themselves, and replies drafted in your voice and left for your approval.

What is an AI worker for Gmail?

An AI worker for Gmail is an AI agent scoped to a single mailbox job, such as sorting what arrived overnight or chasing the replies that never came. It reads threads through your connected Google account and can label, draft, or send only where you have granted that exact permission. Conversations with contacts you have ruled out stay invisible to it, and a worker with no send permission physically cannot email anyone.

What these workers do

Triage the overnight inbox

Sorts what arrived while you were asleep into what needs you today, what can wait, and what is noise, then labels it so the mailbox matches the verdict.

Chase replies that never came

Tracks the messages you sent that asked for something, notices which ones went quiet, and drafts the nudge on the day it is actually due.

Draft answers in your voice

Writes the reply to routine mail and leaves it in drafts, so your job shrinks to reading it and pressing send.

Summarize a long thread before a call

Reads a sprawling conversation end to end and returns the decisions, the open questions, and who is waiting on whom.

How an AI worker runs in Gmail

What it reads

What it writes

When it runs

Gmail questions, answered.

Can an AI worker send email from my Gmail account?

Only if you grant send access. Drafting and sending are separate permissions, so the common setup is a worker that writes the reply into your drafts and stops there. Without send access there is no path by which it can email anyone, no matter what its instructions say.

Will it read every message in my mailbox?

No. It reads only what falls inside the scope you set, which can be limited by contact, by label, and by how far back it may look. Threads involving contacts you have blocked are filtered out before the worker ever sees them.

What stops it emailing the wrong person?

Contact rules are enforced on the way out as well as the way in. A blocked recipient is rejected at the firewall rather than trusted to the worker's judgment, so a mistaken instruction still cannot reach someone you have ruled out.

Does it work with a Google Workspace account?

Yes. Workers connect through standard Google authorization, so a personal Gmail account and a Workspace mailbox are both supported. Your administrator's own policies still apply on top of the permissions you set.

What AI workers can do in Gmail

The tools a worker can be granted in Gmail once you connect it. A kit grants only the ones its job needs, and you can narrow them further on the worker.

Search Email

Search emails across all connected mailboxes (Gmail, M365) in one call, interleaved newest first. If you already have an `id` or `threadId`, use email_get or email_get_thread directly. Each result carries `provider`, `emailAccountOwner`, and `isOutbound` (true for messages the user sent). A Gmail hit omits `hasAttachments` when its summary can't tell; filter with `hasAttachment` or read it with email_get. Paginate via the response's `nextPageToken` back as `pageToken`; stop when `hasMoreEmailsInNextResultPage` is false — there is no totalCount, and a full-`limit` page is complete (don't double-paginate). If `authWarnings` is present, one of several connected mailboxes needs reconnection; surface as a soft warning, not an error.

List Email Folders

List Outlook (Microsoft 365) mail folders across connected mailboxes; each item carries `id`, `name`, `parentId`, and `accountEmail`. Use a folder `id` to scope email_search (`folder`) or as an email_move destination — both also accept well-known names like inbox, so reach for this only to target a custom folder. Outlook-only: Gmail has no folders and contributes nothing here (use email_list_labels). Always HTTP 200; empty `items` with an `accessInfo` note means a permission or connection gap, and `authWarnings` flags a mailbox needing reconnection.

List Email Labels

List Gmail labels across connected mailboxes; each item carries `id`, `name`, `type` ('system' like INBOX/SENT, or 'user'), and `accountEmail`. Use a label `name` to filter email_search (`label`) or to add/remove via email_modify — call this to get valid names instead of guessing. Gmail-only: Outlook mailboxes contribute nothing (use email_list_categories or email_list_folders). Always HTTP 200; empty `items` with an `accessInfo` note means a permission or connection gap, and `authWarnings` flags a mailbox needing reconnection.

List Email Categories

List Outlook (Microsoft 365) categories across connected mailboxes; each item carries `id`, `name`, `color`, and `accountEmail`. Use a category `name` to filter email_search (`category`) or to add/remove via email_modify. Outlook-only: Gmail contributes nothing (use email_list_labels). Always HTTP 200; empty `items` with an `accessInfo` note means a permission or connection gap, and `authWarnings` flags a mailbox needing reconnection.

Get Email

Get a single email by its provider-prefixed ID (e.g., 'google:abc123' or 'm365:xyz789') with body, attachments, labels, and importance. Pair with email_search; to pull an attachment's bytes, pass its id from the returned `attachments[]` to email_get_attachment.

Download Email Attachment

Read one attachment from an email. Use as=model for native PDF/image input in supported hosted runs; otherwise returns base64. Take attachmentId from email_get. Inspect readable/reason for unavailable content. Reading file contents requires the forward_attachments permission.

Get Email Thread

Get all messages in an email thread by its provider-prefixed thread ID, in chronological order (oldest first) with body included. Unlike email_search, this bypasses label/folder rules so the conversation reads end-to-end — the user's own outbound replies appear even on otherwise-blocked labels (e.g. SENT). Contact/domain block rules still apply.

Send Email

Send a new email. Returns the sent message ID and thread ID on success. Use `sendFrom` (or `connectionId`) to pick an account when multiple are connected.

Reply to Email

Reply in-thread to an existing email. Base recipients are derived server-side from the source: an inbound source replies to the original sender; an outbound source (your own sent copy) replies to the original recipients. `replyAll=true` also adds the original CC list. To loop in someone who was NOT on the thread, pass `to`/`cc`/`bcc` — these are added on top of the derived recipients (not a replacement), and are the supported way to reply-and-CC a new person rather than starting a standalone email with email_send. Always sends through the source's mailbox — no sendFrom override. Returns the sent reply's message ID and thread ID.

Forward Email

Forward an email to new recipients. Optionally add a message above the forwarded content. Returns the sent message's ID and thread ID.

Create Draft

Compose a new email and save it unsent to the Drafts folder for a human to review and send. Same recipient/subject/body fields as email_send. Returns a `draftId` (and `threadId` when threaded); pass the draftId to email_send_draft to send it. Creating a draft never sends it — composing and sending drafts are separate capabilities.

Create Reply Draft

Compose an in-thread reply and save it unsent to Drafts for a human to review and send. Base recipients are derived server-side from the source exactly like email_reply (inbound source → original sender; outbound source → original recipients; `replyAll=true` also adds the original CC list); pass `to`/`cc`/`bcc` to loop in people who were not on the thread (additive, not a replacement). Returns a `draftId`/`threadId`; send it later with email_send_draft.

Create Forward Draft

Compose a forward of an existing email to new recipients and save it unsent to Drafts for a human to review and send. Optionally add a message above the forwarded content. Returns a `draftId`/`threadId`; send it later with email_send_draft.

Send Draft

Send an existing draft by its `draftId` — one returned by a create-draft tool, or a draft a human composed manually in the mailbox. Returns the sent message's ID and thread ID. Sending a draft is a separate capability from creating one.

Modify Email

Modify email properties: mark as read/unread, or add/remove labels (Gmail) / categories (Outlook). Names are case-sensitive — Gmail user labels are distinct from system labels (e.g. user 'Important' ≠ system 'IMPORTANT'); discover valid names with email_list_labels (Gmail) or email_list_categories (Outlook).

Move Email

Move a message into a destination folder — a change of location, distinct from email_modify's additive labels/categories. `destinationFolderId` takes a well-known name (archive, inbox, junkemail, deleteditems, and on Outlook also sentitems, drafts) or, on Outlook (M365), a mail-folder ID. On Gmail (GOOGLE), which has no folders, a move is a label swap: the target is applied and INBOX is removed (archive removes INBOX only; junkemail → SPAM; deleteditems → TRASH; inbox re-adds INBOX; any other value is a target label). Note deleteditems/junkemail are valid destinations, so this can move mail to Trash — a recoverable soft-delete, the same end state as email_delete. On Outlook the message is re-homed under a NEW id, so the id you passed is no longer valid — re-fetch via email_search to get the new handle; Gmail keeps the same id.

Delete Email

Delete an email by moving it to Trash/Deleted Items. Not a permanent deletion — the message can be recovered for up to 30 days.

Browse Gmail kits

All apps