Build an AI email and automation agent
Email agents read your inbox, summarise, label or draft replies, and push digests somewhere useful. Most people should start no-code with n8n, Zapier or Make, and move to code only when they need custom logic.
Recommended stack
Model
- OpenAI GPT-6 Luna: ~$0.10 in / $0.50 out per 1M tokens (verified 2026-11-22)
- Anthropic Claude Sonnet 5.5: ~$2 in / $10 out per 1M tokens (verified 2026-11-22 on anthropic.com/pricing)
Framework
- OpenAI Agents SDK: Free, open source; pay for model usage
- LangChain / LangGraph: Open source (free); LangSmith Developer $0 (5k traces/mo), Plus $39/seat/mo (verified 2026-11-15)
Hosting
No-code alternative
- n8n: Community Edition self-host free; Cloud Starter €20/mo, Pro €50/mo billed annually (verified 2026-11-22)
- Zapier: Free 100 tasks/mo; Pro from $19.99/mo billed annually ($29.99 monthly) for 750 tasks (verified 2026-11-15)
- Make: Free 1,000 credits/mo; Core from $9/mo for 10,000 credits (verified 2026-11-15)
Rough monthly cost
$0–25/mo (n8n self-host or Zapier/Make tier + tokens)Approximate. Tool prices checked 2026-11-15.Difficulty
Beginner (no-code) / Intermediate (code)Some links may be affiliate links. Disclosure
Why this stack
- n8n can be self-hosted for free and has Gmail/Outlook nodes plus LLM nodes.
- The OpenAI Agents SDK or LangGraph give you tool calling and multi-step control once you outgrow no-code.
- A cheap model handles summarisation well; save stronger models for drafting replies.
Step-by-step
- Build a flow: new email trigger → LLM summarise → send a daily digest to yourself.
- Add classification (urgent / newsletter / receipt) and apply labels.
- Only then let the agent draft replies, and keep a human approval step before anything is sent.
Common pitfalls
- Grant the narrowest OAuth scopes you can (read-only first).
- Treat email content as untrusted input; emails can contain prompt-injection text.
- Batch emails into one digest call to keep token costs down.
Related stacks
- Build an AI social media auto-posting agent (AI social media auto-posting agent)
- Automate spreadsheets and invoices with AI (AI spreadsheet & invoice automation)
- Build an AI file organizer (AI file organizer)
Last updated 2026-11-22.