Gmail for AI agents: what works and what breaks

Use Gmail or Google Workspace when the mail belongs to a human and an assistant helps that human inside it, with the human reviewing what goes out. Use an inbox built for agents when the agent reads and replies alone, signs up for services, or needs many inboxes, each screened before delivery.

Updated

Gmail is an excellent mailbox for a human: it filters spam, phishing and malware before delivery, with strong deliverability and a wide ecosystem. An AI agent is a different reader.

Gmail and Trotta Mail side by side

Gmail and Google WorkspaceTrotta Mail
Built forA human reading their own mail.AI agents and humans. The guard is stricter for an agent.
When mail is screenedBefore delivery, by spam, phishing and malware filters. Later checks act on delivered mail.While the sending server is still connected, before the message is accepted.
What an agent can readWith gmail.readonly, the whole mailbox.The safe view: hidden text removed, instructions aimed at a model marked, risky links defanged.
Held mail and human reviewUntrustworthy mail goes to spam. Admins can quarantine some threats.Held outside the inbox. The agent sees a verdict, no content. A human can release it.
Outgoing checksSpam policies and sending limits. Data loss rules on some Workspace editions.Screened for secrets, sensitive data and replies steered to a new address.
Sign-in codesReadable with a read scope.Sealed from every API key in a human's mailbox. Parsed for the agent in its own inbox.
Setup for many agentsA Google Account per mailbox, OAuth consent or admin delegation, and Cloud Pub/Sub for push.One API call per inbox. Pods keep each customer's inboxes apart.
Price to startGoogle Workspace is priced per user a month.Free: 2 inboxes, 1,000 emails a month. Developer, $20 a month: 5 inboxes, 5,000 emails. Startup, $200 a month: 50 inboxes, 50,000 emails.

What works

  • Screening before delivery. Gmail scans all messages for malware and moves untrustworthy mail to spam by default. Admins can add pre-delivery scanning that delays a suspicious message.
  • A supported API. A human grants OAuth access, or a Workspace super administrator delegates it.
  • An MCP server, in developer preview. Its listed tools search, read, label and create drafts. None sends.

What breaks when an agent reads the mailbox

  • Warnings are made for a human. Google's yellow warning banners appear in Gmail on the web and nowhere else.
  • A real-looking message can get through. No filter catches everything, and a message with no technical tell can be delivered. What catches it then comes after: a warning when a link to an untrusted domain is clicked and, on some editions, an admin tool to find and erase malicious emails.
  • The agent reads everything. Google describes gmail.readonly as "View your email messages and settings". Sign-in codes and reset links are messages. The narrower gmail.metadata leaves out every body.
  • Sharing a sign-in is discouraged. Google says an account is intended for one user, and a shared one can be challenged or temporarily locked. IMAP, POP and SMTP no longer accept the account password: Google requires OAuth or an app password.
  • Prompt injection is left to you. Google's MCP guide warns that untrusted emails might contain hidden instructions that can hijack a session, and says you must screen prompts and model output for it, with Google's Model Armor or your own tool.
  • Many agents is heavy setup. An alias has no inbox of its own. A public app that reads mail needs restricted scope verification, and a security assessment if it stores mail on servers.

Google's terms do not ban automation as such. The Gmail Program Policies bar automating the Gmail interface in a manner that misleads or deceives. The Terms of Service bar misleading others into thinking generative AI content was created by a human.

When Gmail is the better choice

  • The mail is a human's own, and an assistant drafts and labels while the human sends.
  • The app is internal to your Google Workspace organization, which Google exempts from restricted scope verification.
  • You need IMAP or a desktop mail client. Trotta Mail has neither IMAP nor SMTP access.

When a pre-delivery inbox is the better choice

  • The agent reads, decides and replies with no human checking each message.
  • The agent signs up for services and needs its own verification codes, apart from a human's.
  • Strangers can write to the agent, so mail must be checked for text written to hijack a model.
  • You need many inboxes, created by code.

No filter catches everything, Trotta Mail included. A reworded scam with no technical tell can still be delivered, which is why uncertain mail is held for a human.

What moving looks like

Keep human mail in Gmail and give each agent an address of its own.

  1. Create the inbox with one call. It returns an address and an API key.
  2. Connect the agent by REST API, MCP server, or the TypeScript or Python SDK.
  3. Change the address on the agent's accounts, then remove its Gmail access.
  4. On a paid plan, connect a subdomain such as agents.example.com, so mail for your main domain stays in Google Workspace.
Create an agent inbox
curl -X POST https://api.trotta.email/v1/agents/signup \
  -H "Content-Type: application/json" \
  -d '{"name": "riley"}'

Questions

Can an AI agent use Gmail?

Yes, through the Gmail API or Google's Gmail MCP server, once a human grants OAuth access. Decide what the agent may read, and who checks a message that looks real.

Is it against Google's terms for an AI agent to use Gmail?

Automation is not banned as such. Deceptive automation of the Gmail interface is, and Google says an account is intended for one user.

Can an agent with Gmail access read my sign-in codes?

Yes, if it holds a read scope. Codes and reset links arrive as messages, and gmail.readonly covers your messages.

Can I keep Gmail and still give my agent its own inbox?

Yes. Human mail stays in Gmail. The agent gets a separate address at trotta.email, or on a subdomain you own on a paid plan.

Sources

Every check is on, on every plan. Free for two inboxes. No card.