Hi all, Hamza here (imdifferent01).
A problem I keep seeing with small businesses: real inquiries sit in the inbox next to newsletters, receipts and auto-replies, and nobody turns them into a lead list until it’s too late.
The structure I use in n8n:
- Gmail Trigger on new mail (an IMAP trigger is included as an alternative).
- A Code node filters noise with plain rules (no-reply senders, auto-replies/OOO, receipts, newsletters via List-Unsubscribe) and strips quoted reply chains, so you don’t pay an LLM to read junk.
- A Basic LLM Chain with a Structured Output Parser (OpenAI or Gemini, picked by one field) classifies lead / support / spam / other and extracts name, company, need and contact, plus a 1-10 score.
- Lead and support rows are appended to Google Sheets with a status column (deduped on sender email), and a reply is created as a Gmail draft. Nothing is sent automatically. A separate Error Trigger workflow logs failures.
You can build all of that yourself from the steps above, and I’m happy to answer questions about it here.
Disclosure: I packaged my own version as “Inbox-to-Lead Desk”: three JSON workflows (main, error handler, a no-credentials logic test) plus a setup guide, $9. It’s new, so there are no reviews yet. The logic was tested with mocked AI/Sheets on 20 sample emails; you connect your own Gmail, AI key and sheet.
Question for you: how do you handle the “is this a real lead?” decision? Rules, an LLM, or both?