LLM email triage on n8n
An inbox that sorts, drafts, and routes itself — and asks a human when it isn't sure.
Watch it run
Placeholder — asset coming soon
The problem
A busy inbox buries the messages that matter. Manual triage eats hours every week, and the real risk isn't the volume — it's the one urgent or high-value email that gets missed, or an auto-reply that goes out wrong to the wrong person.
What it does
- Watches an inbox and reads each incoming email.
- Classifies it — category, urgency, and what the sender actually wants.
- Drafts a reply for routine, well-understood messages.
- Routes each email to the right person, folder, or follow-up queue.
- Holds anything it isn't confident about for a human to approve before anything is sent.
How it’s built
Architecture diagram
Placeholder — asset coming soon
- 1Trigger: new email arrives (Gmail / IMAP node).
- 2Classify: the LLM returns a structured verdict — category, urgency, intent, confidence.
- 3Validate: the verdict is checked against a strict schema; a malformed result is retried, never trusted blindly.
- 4Branch on confidence: high-confidence → draft reply + route; low-confidence → hold for human review.
- 5Act: file the email, queue a drafted reply for approval, or escalate. Nothing is auto-sent without clearing the confidence bar.
See it in action
A representative example of input and the validated output it produces.
From: jordan@acme-retail.com
Subject: URGENT — double charged on invoice 7741
Hi, we were billed twice this month for invoice 7741.
Need this sorted today before our finance review at 4pm.{
"category": "billing_dispute",
"urgency": "high",
"intent": "resolve duplicate charge",
"confidence": 0.93,
"suggested_action": "draft_reply + route_to_finance",
"draft": "Hi Jordan — thanks for flagging this. I can see two
charges against invoice 7741 and have escalated it to
our finance team to reverse the duplicate today...",
"requires_human_signoff": false
}The guardrails applied
This is what separates a demo that works once from a system a business can leave running.
Confidence-gated human review
Below the confidence threshold, the email is held and surfaced to a person — no reply is sent automatically.
Structured output validation
Every classification is validated against a strict schema; a malformed or hallucinated field is rejected and retried, not passed downstream.
Cost ceilings
Per-run token caps and a daily spend limit mean a flood of mail or an adversarial message can't run up the bill.
Eval suites with pass thresholds
Classification accuracy is measured against a labelled set of real emails and must clear a defined bar before it goes live.
Fallback and escalation paths
If the model fails or the inbox connection drops, messages route to a manual folder — nothing is silently dropped or mis-sent.
Want this built for your workflow?
Tell me the task and what an error would cost. I’ll scope a version held to the same standard.
Request a reliability audit