All super-powers

Give your AI agent safe access to your real Gmail

Connect your Gmail account. Your agent can read, triage, draft, and reply — as you, from your real address. Every action flows through your approval rules before anything leaves your inbox.

Using Claude Cowork? This replaces the Gmail Connector — same OAuth flow, but with approval rules and audit trails on every action.
Step 1

Connect your Google account in the dashboard

Link your Google account with one OAuth click inside the AgentBlocks dashboard. Toggle Gmail on, and your agent gets scoped access to read and send — no passwords stored, and you can revoke at any time.

ApprovalsActivitySettings

Gmail

Connected Google Accounts
AccountGmailDrive
Step 2

Configure your rules

Choose what your agent can do automatically, what needs your approval, and what's blocked. Rules are evaluated per action — listing your inbox can be automatic while sending always requires your sign-off.

Gmaildefault

Rules are evaluated top-to-bottom within each capability. The first matching rule wins. When no rules match, the system requires approval.

Outbound messages

Match recipient email address

Recipient patternAction
Anything elseRequire approval
+ Add rule

List inbox

Always allow
Require approval
Always block

Read messages

Always allow
Require approval
Always block

List labels

Always allow
Require approval
Always block

Archive messages

Always allow
Require approval
Always block

Modify labels

Always allow
Require approval
Always block
Save all rules
Step 3

Tell your agent about AgentBlocks

Paste a setup snippet with your API key into your agent's prompt. It reads the docs, discovers it can access Gmail through AgentBlocks, and configures itself. No SDKs to install.

In order to help me complete the next tasks, you'll need to use the
AgentBlocks API, which allows us to selectively give you (the agent) tool
access. I have created an API key for you:
sk-example_xxxxxxxxxxxxxxxxxxxxxxxx . The docs are at
https://docs.agentblocks.ai
Reading AgentBlocks docs ...
Discovered Gmail super-power — read, triage, draft, and reply.
✓ Ready to manage your inbox.
Step 4

It reads, triages, and organises — all automatically

Reading emails, applying labels, and archiving newsletters are auto-approved. Your agent works through your inbox without interrupting you — nothing leaves your account until you say so.

Triage my inbox. Label and archive anything that doesn't need a reply.
Draft replies for everything that does.
$ curl -s -H "Authorization: Bearer sk_example_..."
https://api.agentblocks.ai/v1/gmail/messages?unread=true
agentblocks: auto-approved
12 unread messages. Categorising ...
Archived 5 marketing emails → labelled "marketing"
Archived 3 automated updates → labelled "updates"
2 need replies — David (partnership), Lisa (Q2 report)
2 FYI — marked as read
Drafting replies for David and Lisa ...
Step 5

Sending as you requires your approval

When your agent wants to reply or compose from your real address, it drafts the message and waits. You see the full email — who it's going to, the subject, the body, the thread context — before anything is sent as you.

$ curl -X POST -H "Authorization: Bearer sk_example_..."
-d '{"action": "reply",
"thread_id": "18f2a...",
"body": "Hi David, Thanks for the detailed proposal ..."}'
https://api.agentblocks.ai/v1/gmail/send
{"status": "pending_approval", "ref": "c47d8f12"}
▲ WAITING FOR APPROVAL ...

Meanwhile ...

Get approval notifications on Slack, WhatsApp, via email, or wherever's convenient for you. See exactly what will be sent from your address.

AB
AgentBlocksAPP10:14 AM

Gmail send request (ref: c47d8f12)

Agent: inbox-assistant
Sending as: [email protected]
Action: reply

Subject: Re: Partnership proposal — next steps

Thread: 4 messages

Hi David,

Thanks for the detailed proposal. I've reviewed the terms and everything looks good on our end. I'm looping in our legal team to finalise the agreement ...

[message truncated]

You approve the reply, and it's sent from your real Gmail address — appearing in your Sent folder and the original thread, exactly as if you'd typed it yourself.

✓ Approved
Reply sent as [email protected]
Subject: Re: Partnership proposal — next steps
Thread: 18f2a... (now 5 messages)
Step 6

Then let it run

Your agent manages your inbox for as long as you need — reading, labelling, archiving, and drafting automatically. It only surfaces when there's a message to send from your address. One tap to approve, and it keeps going.

Agent activity — morning inbox triagestarted 08:00
08:00

Connected to Gmail via OAuth

[email protected] — read/send scopes granted

AUTO
08:01

Fetched unread messages

12 unread → 4 need action, 8 informational

AUTO
08:02

Applied labels and archived 8 newsletters

Auto-labelled: marketing (5), updates (3)

AUTO
08:03

Drafted reply to David (partnership proposal)

Re: Partnership proposal — next steps

AUTO
08:03

Send reply as [email protected]

To: [email protected] — 4-message thread

⏳ WAITING
08:04

Drafted reply to Lisa (Q2 report review)

Re: Q2 numbers — feedback attached

AUTO
08:04

Send reply as [email protected]

To: [email protected] — internal thread

⏳ WAITING

⚡ 2 replies awaiting approval

Reading, labelling, and drafting is automatic — only sending from your real address requires your sign-off.

Give your agent safe
Gmail access today.

One OAuth click. One API key. Your agent handles the rest.

🦞 Works great with OpenClaw, Claude Cowork and Claude Code