Recipes / Email & inbox
Any agentFull setupEmail & inbox

Route a firm's inbox: candidates, clients, spam

Job candidates get an instant auto-reply, client emails get a drafted reply saved for review plus a Slack alert, and spam gets labeled. Everything is logged to Google Sheets.

From u/malbagir2803 (r/n8n) on Reddit · Apr 2026

Setup time1–2 days
Costn8n + model
RunsOn every new email
Needsn8n, Gmail, Gemini or any model
Last updated2026-11-10

What the source did

  • Gmail trigger checks every minute; an If node skips the firm's own sent emails so auto-replies don't loop.
  • Logs every email to Google Sheets on arrival.
  • One Gemini call classifies and summarizes into JSON: KANDIDAT (candidate), KLIEN (client) or SPAM.
  • Candidates get an instant auto-reply. Clients get a Gemini-drafted reply saved as a Gmail draft, never auto-sent, plus a Slack alert to #sales-leads. Spam is labeled.
  • The April post says he built it for PrimaSolusi Consulting, an HR consultancy. The repo README (Oct 2026) calls it a portfolio demo for a fictional agency, tested with test emails.

Summary written by Agent Cookbook from the original post. See the original for the full context. How we source recipes

Our notes

What it takes
n8n, Gmail, a model (his is Gemini), Google Sheets and Slack, starting from the workflow JSON in the GitHub repo. The README says to restrict the IF node to your own address while you test.
Where it breaks
Gmail Trigger can't filter by query, so auto-replies re-trigger the workflow; he stops the loop with an If node on the sender, which he calls fragile. Model output that matches no Switch branch falls through silently. He's not sure the dedupe holds on reconnects.
Human checkpoint
Client replies are saved as drafts for a person to send, with a Slack alert. Candidate auto-replies go out automatically; the README suggests a draft instead if that's too aggressive. The README (revised Oct 20, 2026) now calls it a portfolio demo tested with test emails, not a live business inbox.
Tools involved
n8n, Gmail, Gemini or any model

✓ Verified Source link checked and still live. Notes by Thomas, editor. How we verify

Get their template

Made and published by u/malbagir2803 (r/n8n). Start here; it is their original, not ours.

Their prompt

From u/malbagir2803's workflow Their exact wording: the client-reply prompt from the workflow file. The classifier prompt in the file is in Indonesian. Source ↗

Draft a professional email reply to the following message: From: {{ $('Gmail Trigger').item.json.from.text }} Subject: {{ $('Gmail Trigger').item.json.subject }} Email Summary: {{ $('Basic LLM Chain').item.json.output.summary }} Instructions: - You are replying on behalf of PrimaSolusi Consulting, an HR and recruitment consultancy. - Be professional and warm. - Acknowledge their inquiry and express interest in helping. - Suggest scheduling a brief call or meeting to discuss their needs further. - Do not make up specific pricing or promises — keep it general. - Maximum 120 words. - Write in Bahasa Indonesia.

Approval rule

🛡
Client replies always stay drafts.

Set it up

  1. Import his workflow JSON into n8n.
  2. Add your Gmail, Gemini, Google Sheets and Slack credentials, and put your own address in the self-email If node.
  3. Rewrite the categories, auto-reply and draft instructions for your business.
  4. Add a catch-all branch for model output that matches no category (our suggestion; the post only asks how to handle this case).
  5. Keep client replies as drafts.

Common failures

⚠
  • Auto-replies trigger the workflow again; filter out your own address.
  • Output that matches no Switch condition falls through silently, per the post. In our version, log it and alert.

Variations

  • Grok Bot routine with Gmail drafts.

Get the 10 best agent setups. Free.

Plus new recipes every week. One email, no spam.

Unsubscribe anytime. Privacy

Related recipes

Same job: Email & inbox

In these guides: AI agents for small business → · AI email agents →

Get their template ↗