{"slug": "i-automated-my-inbox-triage-with-n8n-gpt-4o-mini-copy-the-exact-workflow", "title": "I automated my inbox triage with n8n + GPT-4o-mini (copy the exact workflow)", "summary": "A developer built an n8n workflow that uses GPT-4o-mini to triage unread Gmail messages into four fixed labels — REPLY_TODAY, TASK_LATER, READ_LATER, and NOISE — and drafts a one-sentence reply only for the two buckets that need one. The key design decision was replacing an open-ended \"is this important?\" prompt, which returned \"somewhat important\" for every message, with a closed taxonomy requiring exactly one label per email. The workflow runs on a schedule, routes messages via an n8n Switch node on the model's first output line, and is packaged as a ready-to-import template.", "body_md": "You don't need an empty inbox. You need to know which 12 of your 200 unread emails actually need you today — and which ones can die quietly.\n\nI got tired of scanning my inbox every morning, so I built a small **n8n + GPT-4o-mini** workflow that reads new mail, sorts every message into one of four buckets, and drafts a reply for the ones that need one. It runs on a schedule, costs pennies, and takes about 15 minutes to set up.\n\nHere's the whole thing — plus the one design decision that made it actually usable.\n\nThe first version I built asked the model \"is this email important?\" It was useless. Every email came back \"somewhat important.\"\n\nThe fix was to stop asking for a judgement and start asking for a **single label from a fixed taxonomy**. Four buckets, no hedge, no score:\n\nOne label per email. That's it.\n\nYou are an inbox triage assistant. Read the email below and return **exactly one** of these labels on the first line: `REPLY_TODAY`, `TASK_LATER`, `READ_LATER`, `NOISE`.\n\nRules:\n\n- Only use\n`REPLY_TODAY` if a specific person is blocked on your answer.- Marketing, cold sales, and automated notifications are always\n`NOISE`.- If you choose\n`REPLY_TODAY` or `TASK_LATER`, write a one-sentence draft reply (max 40 words) on the second line, in the sender's language, in a friendly professional tone.\nSubject: {{ $json.subject }}\n\nFrom: {{ $json.from }}\n\nBody:\n\n{{ $json.snippet }}\n\nTwo things matter here: **the label set is closed**, and the draft is only generated for the two buckets that need one. That keeps token usage (and cost) low.\n\n`in:inbox is:unread newer_than:1d`.` REPLY_TODAY` gets starred + draft attached; `TASK_LATER` gets appended to a Google Sheet; the rest get labeled and archived.\nThat's a real workflow, not a toy. The router is just a `Switch` node on the first line of the model's output.\n\nRebuilding this from scratch (Gmail OAuth, the filter, the parser, the router) is the boring part. I packaged the polished version as a ready-to-import n8n template:\n\nTriage your inbox once, and you'll never go back to scanning.", "url": "https://wpnews.pro/news/i-automated-my-inbox-triage-with-n8n-gpt-4o-mini-copy-the-exact-workflow", "canonical_source": "https://dev.to/haopengai/i-automated-my-inbox-triage-with-n8n-gpt-4o-mini-copy-the-exact-workflow-5ef6", "published_at": "2026-10-06 00:06:45+00:00", "updated_at": "2026-10-06 00:17:35.446094+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "generative-ai", "ai-agents"], "entities": ["n8n", "GPT-4o-mini", "Gmail", "Google Sheets", "OpenAI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-automated-my-inbox-triage-with-n8n-gpt-4o-mini-copy-the-exact-workflow", "markdown": "https://wpnews.pro/news/i-automated-my-inbox-triage-with-n8n-gpt-4o-mini-copy-the-exact-workflow.md", "text": "https://wpnews.pro/news/i-automated-my-inbox-triage-with-n8n-gpt-4o-mini-copy-the-exact-workflow.txt", "jsonld": "https://wpnews.pro/news/i-automated-my-inbox-triage-with-n8n-gpt-4o-mini-copy-the-exact-workflow.jsonld"}}