Get your API key

Intermediate · 6 lessons · 52 min

Automate your email with an AI agent

Give an agent access to your inbox the careful way: read first, label and draft next, and the send button stays with you.

Who it's for

Someone whose inbox decides their day: a freelancer answering client enquiries, a student tracking college notices, or anyone drowning in newsletters, receipts and follow-ups. You have used an agent before, and you want the automation without handing over your whole mailbox.

What you'll build

A read-only inbox connection you can disconnect in one minute, a morning triage that labels and summarises, reply drafts that wait for your approval, and a daily run that happens without you.

Why this course

People hand their inbox to an agent and then discover two uncomfortable facts. First, email is other people's text: Anthropic names inbound email bodies as a prompt injection source, warning that whoever can influence that content can try to redirect the agent. Second, the permission that looks harmless usually is not: Google's gmail.modify and gmail.compose both include sending, so a scope added for labels can also send mail as you. The vendor documentation explains each piece, but nobody walks a beginner through the access levels, the approval gate and the disconnect step in one place.

Take first: Prompting for AI coding

Lessons in this course

  1. 1What inbox access really meansRead, search, label, draft, send, delete: six levels of access, what each can do, and why email content must be treated as data. 8 min Free
  2. 2Four routes to your inbox, and which one fits youA built-in connector, an MCP server, your own API script, or an app password. Each has a gate, and one of them is much easier than the rest. 9 min Log in to open
  3. 3Connect it, then prove it worksThe exact prompts for the agent, where the consent screen appears, a five-line test that proves read-only access, and how to disconnect. 9 min Log in to open
  4. 4Your first automation: the morning triageLabels that mean something, a digest you can read in one minute, and the two rules that keep the agent away from send and delete. 9 min Log in to open
  5. 5Draft the reply, keep the send buttonDrafting from a thread with your voice, the review that catches a wrong reply, and the permission setting that puts a human in front of send. 9 min Log in to open
  6. 6Run it daily, measure it, and keep the keysScheduling on your computer or in the cloud, the audit that takes five minutes a week, and the four things you must never automate. 8 min Log in to open
Next upRun your email outreach alone with AI agentsFind the right people, send personal emails, follow up on time and book meetings: one person, one Sheet, one coding agent.