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 ↗
Approval rule
Set it up
- Import his workflow JSON into n8n.
- Add your Gmail, Gemini, Google Sheets and Slack credentials, and put your own address in the self-email If node.
- Rewrite the categories, auto-reply and draft instructions for your business.
- Add a catch-all branch for model output that matches no category (our suggestion; the post only asks how to handle this case).
- 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