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

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

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.
  • Built for PrimaSolusi Consulting, an HR consultancy.

Summary written by Agent Cookbook. See the original for the full context.

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 (commenters' suggestion).
  5. Keep client replies as drafts.

Common failures

⚠
  • Auto-replies trigger the workflow again; filter out your own address.
  • Output that matches no category disappears silently; 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

Get their template ↗