The AI Loadout

How to read and Send Gmail with an AI agent

In Claude Code, connect Gmail as a claude.ai connector and it shows up automatically. For Codex and Cursor, use the Google Workspace CLI (gws) plus its Gmail skill. Grok Bot connects to Gmail directly. In every case, have the agent draft replies and send only after you check them.

Checked against official docs on Oct 26, 2026.

Get the free starter kit. One short email a day when our setups change.

Free starter kit on signup: 2 Claude Code skills and 1 agent persona from our paid packs. By subscribing you agree to get The AI Loadout Daily, one email each morning. No spam, we never sell your email, and every email has a one-click unsubscribe link.

Claude Code

  1. Go to claude.ai/customize/connectors and connect Gmail
  2. Log in to Claude Code with the same claude.ai subscription account
  3. Run /mcp in Claude Code to confirm Gmail is listed
  4. Ask: "Summarize unread email from today and draft replies. Do not send."

Codex

  1. npm install -g @googleworkspace/cli
  2. gws auth setup (walks you through a Google Cloud project)
  3. gws auth login -s gmail
  4. Copy skills/gws-gmail from the gws repo into .agents/skills/ so Codex knows the commands
  5. Ask Codex to run gws gmail +triage, then draft replies for you to approve before gws gmail +send

Cursor

  1. Install and log in to gws the same way
  2. Copy skills/gws-gmail into .agents/skills/ or .cursor/skills/
  3. Ask the agent to triage your inbox with gws gmail +triage and show drafts before sending

Grok Bot

  1. Connect Gmail to Grok Bot
  2. Ask: "What needs a reply today? Draft answers."
  3. Approve each send. Sending email is a sensitive action and Grok Bot asks first

Gotchas

  • gws is not an officially supported Google product, per its own README.
  • Unverified Google Cloud apps can fail on broad scopes, especially for @gmail.com accounts. Request only the gmail scope.
  • Emails can contain prompt injection. Do not let an agent act on instructions found inside an email.

The loadout for this job

FAQ

Can Claude Code read my Gmail?

Yes, if you connect Gmail at claude.ai/customize/connectors and log in to Claude Code with that claude.ai account.

Should an AI agent send email without asking?

No. Have it draft, and you approve every send.

Related how-tos

Sources

Commands change. Check the linked docs before you run anything. All how-to guides

Want tested skills and personas installed in one command? See the AI Loadout packs, from $9.