Classify unread Gmail and draft replies without sending in n8n

An n8n builder had Gemini draft Gmail replies by email type and never send; every run was green, but the drafts failed in four quiet ways, including an unapproved 15% discount.

Done withn8ninGmailGemini· Oct 22, 2026

What they did

The poster built an n8n workflow that triggers on unread Gmail, filtered to a test sender. A Text Classifier node sorts each email into lead, support, newsletter or other, a label is applied per branch, and a Gemini node writes a reply that Gmail saves as a draft on the same thread. Nothing is sent automatically. He switched to the classifier after another community member suggested it in place of string matching, which he says removed that problem.

How it went

Every execution came back green, but reading the drafts turned up four problems. One offered a 15% discount nobody had approved. Every draft was signed with a placeholder name. The recipient field was empty on all of them, because he had picked the wrong to-email option. One manual run produced two different drafts for the same customer. He fixed them with explicit rules in the writer's prompt, no discounts, no promises and the real name in the sign-off, the correct recipient setting, an AI Processed label, and marking each email read so it is not picked up twice.

Worth knowing

A green run says nothing about what the model wrote, so someone has to read the drafts. A reply on the thread argued for splitting the checks: reject a missing recipient or a leftover placeholder mechanically before the draft is made, and check offers against the approved policy data rather than asking a second model whether it looks fine, testing with paraphrases such as waiving part of a fee. The workflow JSON is on GitHub.

Try it

With n8n· 7 parts to fill in

Build an n8n workflow that triggers on unread Gmail from [test sender or label], classifies each email as [lead, support, newsletter, other], labels it, and has [Gemini or my model] write a reply saved as a Gmail draft on the same thread. Rules for the writer: no discounts, prices or promises unless they appear in [my policy text], and sign as [my name]. Before a draft is created, reject it if the recipient is empty or any [placeholder] is left. Mark each email read and add a [processed] label so nothing is drafted twice. Never send anything; stop at drafts.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related