n8nIntermediate11 min readUpdated Jun 1, 2026

n8n: Inbox Triage That Actually Learns Your Priorities

A Gmail-to-Notion pipeline that classifies email by priority, drafts replies, and quietly archives the noise — using Claude for classification and a small feedback loop that improves weekly.

n8nemailclaudeproductivitygmail

Download this template

Grab a structured copy of "n8n: Inbox Triage That Actually Learns Your Priorities" as JSON (for programmatic import) or Markdown (for docs and README files). Both are licensed CC-BY-4.0 with attribution.

Overview

Most inbox-zero automations fail because they're static: they misclassify the same email type every day. This n8n workflow adds a feedback loop — you drag emails between Notion columns, and the classifier learns from your corrections weekly. The result is a triage system that mirrors your real priorities, not a generic rubric.

How it works

  1. Gmail trigger fires on every new email in the primary inbox.
  2. A Claude Haiku call classifies the email into one of five buckets: reply-now, reply-today, FYI, newsletter, or archive.
  3. The email is mirrored into a Notion database with the AI's classification, confidence, and a suggested reply for the top two buckets.
  4. You review Notion twice a day, dragging cards between columns when the AI is wrong.
  5. A weekly n8n schedule pulls the last 7 days of overrides, extracts the delta, and appends them as few-shot examples to the classifier prompt.

Benefits

  • Cuts inbox time to two 10-minute windows a day.
  • The classifier gets more accurate every week without manual prompt engineering.
  • You always have a written record of every AI-drafted reply and whether you sent it.

Use cases

  • Founders whose inbox is 60% newsletters + 40% real work.
  • Support leads triaging shared inboxes across time zones.
  • Executives with EAs who want AI to prep, not decide.

Step-by-step guide

Step 1: Set up Gmail OAuth in n8n

Use a dedicated Google Cloud project and restrict scopes to gmail.readonly, gmail.modify, and gmail.compose. Never grant full access.

Step 2: Build the Notion database

Columns: Subject, From, Received, AI Category, AI Confidence, Human Category, Draft Reply, Sent. The Human Category column is the training signal.

Step 3: Write the classifier prompt

Anchor with your five categories, define each with 2-3 real examples from your own inbox, and demand a JSON output. Temperature 0.

Step 4: Draft replies only for two buckets

reply-now and reply-today. Everything else is triage, not composition. This keeps token cost sane.

Step 5: Add the weekly feedback job

Every Sunday, pull rows where Human Category ≠ AI Category, sample up to 20, and append them as few-shot examples to the prompt in the next run.

Step 6: Measure and cap

Track weekly accuracy in Notion. If it stops improving, freeze the prompt — over-training on your own corrections leads to overfit rules.

Example

Input: 'Re: Q3 board deck — quick question' from CEO. Output: { category: 'reply-now', confidence: 0.92, draft: 'Yes — the revenue chart is pulling from the wrong tab. Fixing now, updated deck by 3pm.' }

FAQs

Related resources

Workflows, articles, and tools that pair with this build.