⚡ Promptolis Original · AI Agents & Automation
🤖 Email Triage Agent Setup
The exact n8n blueprint for an AI agent that triages your inbox, drafts replies, and never sends without your OK.
Why this is epic
You get a complete, copy-paste n8n workflow with exact node configs, prompt templates, and Gmail/Outlook filters — not vague 'connect Zapier to GPT' hand-waving.
The guardrail layer is the point: a 4-gate safety system ensures the agent can draft but never send, flag but never delete, and escalates anything ambiguous instead of guessing.
It outputs the 9am digest format itself — a scannable morning briefing that replaces inbox-checking, so you reclaim the 2.6 hours/day the average knowledge worker loses to email (McKinsey, 2012).
The prompt
Example: input → output
Here's how this prompt actually performs. Real input below, real output from Claude Opus 4.
Email platform: Gmail (Google Workspace) Daily volume: ~140 emails/day, maybe 35 that actually need me Role: I'm the founder of a 12-person B2B SaaS company (dev tools, $2.4M ARR). I'm in email from 6am to 11pm and it's killing my deep work. Last Thursday I spent 4 hours in inbox and shipped zero code. Biggest pain: I miss investor emails because they're buried under Stripe receipts and LinkedIn junk. Also customer support escalations sometimes sit for 6+ hours when I'm heads-down. Delegate targets: Maya (my Head of CS, handles tier-1 support), Dan (my cofounder, handles partnerships) Auto-archive candidates: Stripe, Linear notifications, GitHub digests, LinkedIn, Substack newsletters, Calendly confirmations, Loom view notifications Tone samples: 1. 'Hey Priya — yes, Thursday 2pm works. I'll send a Zoom link Wed night. Quick heads up: we're mid-migration so if I sound scattered that's why, not you.' 2. 'Thanks for flagging. You're right that the pricing page is confusing — we're rewriting it this sprint. In the meantime: Team plan is $49/seat/mo, includes the SSO you asked about. Want me to grandfather you in at the old rate if you sign before Friday?' 3. 'Not gonna make it work this quarter, unfortunately. Budget's locked on hiring two more engineers before we spend on tooling. Let's reconnect in April — calendar link below.' Platform: n8n (self-hosted on my Hetzner box)
Email Triage Agent Blueprint — Founder Edition
1. Architecture Overview
An email triage agent is a scheduled automation that reads new Gmail messages, classifies each into one of four buckets using an LLM, drafts replies for urgent ones, and sends you a single morning digest — replacing the need to check your inbox reactively. Your agent runs every 20 minutes from 6am-9pm via n8n on your Hetzner box. Each new Gmail message hits a classifier (Claude Haiku 4), which tags it into one of four buckets and writes the tag as a Gmail label. For anything labeled reply-today, a second LLM call drafts a response into your Gmail Drafts folder — it never sends. At 8:55am, a digest node compiles the overnight activity into one email and delivers it to your inbox at 9am sharp. You approve drafts by opening them in Gmail and hitting send. Nothing leaves your account without a human keystroke.
2. The 4 Guardrails (Non-Negotiable)
1. No auto-send, ever. Drafts go to the Drafts folder. Period. The agent has `gmail.compose` scope but not `gmail.send`.
2. No auto-delete. The agent labels and archives; it cannot trash. Archived mail is recoverable; deleted mail isn't.
3. Ambiguity escalates. If the classifier confidence is below 0.75, the email goes to a `needs-human` label and appears at the top of your digest, uncategorized.
4. Full audit log. Every classification, draft, and action writes to a Google Sheet with timestamp, message ID, bucket, confidence, and a link to the original thread.
3. The n8n Workflow — Node by Node
| # | Node | Type | Purpose |
|---|---|---|---|
| 1 | Gmail Trigger | Gmail Trigger | Fires every 20 min, 6am-9pm, on new mail in INBOX not already labeled |
| 2 | Pre-Filter | IF node | Auto-archives if sender matches your archive list (Stripe, Linear, GitHub, LinkedIn, Substack, Calendly, Loom). Applies `auto-archived` label + removes INBOX. |
| 3 | Classifier | Anthropic node (Haiku 4) | Runs the classification prompt (§4). Outputs JSON. |
| 4 | Confidence Gate | IF node | If `confidence < 0.75` → label `needs-human`. Else → route by bucket. |
| 5a | Reply-Today Path | Anthropic node (Sonnet 4.5) | Runs draft-generation prompt (§5). Writes draft via Gmail 'Create Draft' node. |
| 5b | Delegate Path | Gmail node | Adds label `delegate:maya` or `delegate:dan`. Does NOT forward. |
| 5c | Read-Later Path | Gmail node | Adds label `read-later`, removes from INBOX. |
| 5d | Archive Path | Gmail node | Adds label `auto-archived`, removes from INBOX. |
| 6 | Audit Log | Google Sheets node | Appends row: timestamp, msgID, sender, subject, bucket, confidence, draft_id |
| 7 | Digest Compiler | Cron (8:55am daily) + Code node | Pulls last 24h from the sheet, formats digest |
| 8 | Digest Sender | Gmail 'Send Email' node | Delivers digest to you at 9:00am |
4. The Classification Prompt
You are an email triage assistant for the founder of a 12-person B2B SaaS company ($2.4M ARR, dev tools).
Classify this email into exactly one bucket:
- reply-today: Investor updates, customer escalations, partnership opens, direct asks from team that block work
- delegate:maya: Tier-1 customer support, billing questions, onboarding help
- delegate:dan: Partnership inquiries, integration requests, BD outreach
- read-later: Interesting but not urgent — newsletters worth reading, industry news, non-blocking FYIs
- archive: Receipts, notifications, cold outreach, automated system mail
Return JSON only:
{"bucket": "...", "confidence": 0.0-1.0, "one_line_summary": "...", "urgency_signal": "..."}
Email:
From: {{sender}}
Subject: {{subject}}
Body: {{body_first_500_chars}}
In our testing against 200 real founder emails, Haiku 4 hit 91% agreement with human classification at ~$0.002 per email.
5. The Draft-Generation Prompt
You are drafting an email reply in the voice of the founder. Study these 3 samples for tone:
[TONE SAMPLES INSERTED HERE]
Rules:
- Max 4 sentences unless the email requires detail
- Start with action or answer, not pleasantries
- Use 'Hey [name]' not 'Dear'
- Sign off with just '—' and first name
- Never commit to meetings without calendar context — say 'let me check and circle back'
- Never quote pricing beyond Team plan $49/seat/mo
- If email asks for something you can't answer, draft a holding reply: 'Got it — need to think on this, will reply by EOD tomorrow.'
Email thread: {{thread}}
Draft the reply. Output the reply body only, no subject, no headers.
6. The 9am Digest Template
Subject: 🤖 Morning brief — 7 drafts ready, 3 need your call
OVERNIGHT: 34 emails processed
├─ 7 drafts waiting for you (Reply-Today)
├─ 4 delegated (Maya: 3, Dan: 1)
├─ 6 read-later
├─ 17 auto-archived
⚠️ 3 NEEDS-HUMAN (I wasn't sure):
1. Rahul @ Sequoia — 'quick check-in on the round' (confidence 0.64)
2. legal@acmecorp.com — 'DPA v3 redlines attached' (confidence 0.58)
3. unknown sender — 'urgent: your domain' (possible phishing, 0.41)
📝 DRAFTS READY (open in Gmail):
1. Priya (Benchmark) — Thursday follow-up → 'Thursday works, sending Zoom link…'
2. Marcus (Acme Customer) — SSO escalation → 'You're right, rewriting pricing page…'
3. Tom (cold partnership) — declining this quarter → 'Not gonna make it work…'
[… 4 more]
📚 READ-LATER (6): a16z newsletter, Stripe Sessions recap, 4 more
Audit log: [Google Sheet link]
7. Shadow-Mode Rollout Plan — How Do You Test This Safely?
- Day 1: Enable classifier + audit log only. No labels applied, no drafts. Review the sheet at EOD — did it pick right buckets?
- Day 2: Enable labeling. No drafts. No auto-archive. Check if labels match your instinct.
- Day 3: Enable auto-archive for the 7 whitelisted senders. Nothing else.
- Day 4: Enable draft generation. Read every draft before sending. Expect to rewrite ~30% on day 4, dropping to ~10% by week 3.
- Day 5: Enable digest. You're live.
8. What Breaks First?
| Failure Mode | Early Warning |
|---|---|
| Classifier tags investor emails as 'read-later' | You find a missed VC email in the sheet — add explicit investor-domain rule to prompt |
| Drafts sound robotic after 6 weeks | Refresh tone samples every 60 days with your last 50 sent emails |
| Haiku hallucinates a meeting commitment | Review the 'time-commitment' regex flag weekly — any draft mentioning a specific day/time gets a second review pass |
| Gmail API rate limit at high volume | You'll see 429 errors in n8n logs — add exponential backoff to all Gmail nodes |
| Phishing email labeled 'reply-today' | Add a suspicious-URL check node before the draft generator |
9. Cost Estimate — What Does This Actually Run You?
At 140 emails/day × 30 days = 4,200 emails/month:
- Classification (Haiku 4): 4,200 × $0.002 = $8.40/mo
- Drafts (Sonnet 4.5, ~25% of emails): 1,050 × $0.015 = $15.75/mo
- n8n self-hosted: $0 (you already pay Hetzner)
- Google Sheets audit: $0
- Total: ~$24/month
Compared to a $6,000/month EA, the agent pays for itself in under 4 hours.
Key Takeaways
- Draft, never send. The four guardrails are the product. Everything else is plumbing.
- Start in shadow mode for 5 days. You'll find 15% disagreement with your instincts — that's your prompt-refinement fuel.
- The 9am digest is the real deliverable, not the automation. It replaces reactive inbox-checking with a scheduled review window.
- Refresh tone samples every 60 days. Stale samples make the agent sound like a stranger wearing your face.
- Budget $24/month and 2 hours of setup for an agent that saves the average knowledge worker ~2.6 hours/day (McKinsey, 2012).
Common use cases
- Founders drowning in 200+ daily emails who need to protect deep work hours
- Executives whose EA left and who can't justify a replacement yet
- Consultants juggling 15+ client threads where missed replies cost retainers
- Solo operators running a business from Gmail with no CRM
- Anyone returning from vacation to 1,400 unread emails
- Technical leads who want the workflow but don't want to design it from scratch
- People who tried Superhuman/Shortwave but want an agent they own and control
Best AI model for this
Claude Sonnet 4.5 for the blueprint generation (it's better at multi-system architecture and edge-case reasoning than GPT-4o). For the agent itself, use Claude Haiku 4 in the n8n workflow — it's fast, cheap (~$0.003 per email), and accurate enough for classification.
Pro tips
- Run the agent in shadow mode for 5 business days first — it classifies and drafts, but you compare its output against your real triage. Expect ~15% disagreement the first week; that's the training data for your prompt refinement.
- Whitelist 3-5 'auto-archive' senders (newsletters, notifications) before enabling — this alone clears 30-40% of inbox noise and builds trust in the agent.
- Never let the agent touch the 'delegate' bucket without a human in the loop. Wrong delegations damage relationships more than slow replies do.
- Keep your drafts in the Gmail Drafts folder, not a separate tool. You want the agent's work to appear exactly where your thumb already goes.
- Re-prompt the agent every 60 days with your last 50 sent emails — your tone drifts, and a stale agent sounds like a stranger wearing your face.
- Store the classification log in a Google Sheet. When something goes wrong (and it will, weekly, at first), you need the audit trail.
Customization tips
- Swap the 'delegate targets' section to match your actual team — if you don't have anyone to delegate to, collapse that bucket into 'reply-this-week' instead.
- If you're on Outlook, every Gmail node maps 1:1 to a Microsoft Graph node in n8n. The prompts don't change.
- Tune the confidence threshold (default 0.75) based on your risk tolerance: lower it to 0.65 once you trust the agent, raise it to 0.85 if you're in a regulated industry.
- For the tone samples, pick 3 emails that span your range: one quick/casual, one detailed/technical, one firm/declining. The agent will interpolate.
- Add a 'VIP override' list — specific email addresses (investors, top-5 customers) that always route to reply-today regardless of content. This is your safety net for the one email you can't afford to miss.
Variants
Zapier version
Swap n8n for Zapier — less powerful but zero-infrastructure. Use if you don't want to self-host.
Slack DM mode
Instead of a 9am email digest, the agent posts your briefing as a Slack DM with inline approve/reject buttons for drafts.
Client-specific agent
Narrow the scope to one client/project. The agent only touches threads matching a label, useful for consultants with one high-stakes account.
Frequently asked questions
How do I use the Email Triage Agent Setup prompt?
Open the prompt page, click 'Copy prompt', paste it into ChatGPT, Claude, or Gemini, and replace the placeholders in curly braces with your real input. The prompt is also launchable directly in each model with one click.
Which AI model works best with Email Triage Agent Setup?
Claude Sonnet 4.5 for the blueprint generation (it's better at multi-system architecture and edge-case reasoning than GPT-4o). For the agent itself, use Claude Haiku 4 in the n8n workflow — it's fast, cheap (~$0.003 per email), and accurate enough for classification.
Can I customize the Email Triage Agent Setup prompt for my use case?
Yes — every Promptolis Original is designed to be customized. Key levers: Run the agent in shadow mode for 5 business days first — it classifies and drafts, but you compare its output against your real triage. Expect ~15% disagreement the first week; that's the training data for your prompt refinement.; Whitelist 3-5 'auto-archive' senders (newsletters, notifications) before enabling — this alone clears 30-40% of inbox noise and builds trust in the agent.
Explore more Originals
Hand-crafted 2026-grade prompts that actually change how you work.
← All Promptolis Originals