
Built by: Mark Geoffrey A. Batocabe, GHL Automation Specialist Stack: n8n Cloud · Google Gemini API · Google Sheets · Gmail · Slack · JavaScript Demo video: https://www.loom.com/share/24af0dc8fef441d68d45a5893f466681 - https://www.loom.com/share/4f0e3ddc5e8546c6b34ee79b85275996
An AI-powered lead qualification system that scores every inbound lead, writes a personalized follow-up email, and alerts the sales team on Slack, in about 30 seconds and with no manual work.
The problem: Small businesses receive inquiries from forms, but they reply slowly and can't tell serious clients from spam, job seekers, or vendors. Hot leads go cold while they wait.
The solution: Every form submission is deduplicated, enriched with the lead's website content, and analyzed by Gemini. Hot leads instantly get a personalized email draft and a Slack alert. Every lead, including spam, is logged to a CRM with a score and the AI's reasoning.
| Metric | Result |
|---|---|
| Time from form submit to Slack alert | ~30 seconds |
| Test scenarios passed | 10 / 10 |
| Prompt injection attempt | Blocked (scored 0, flagged as spam) |
| Leads lost when the AI or a website fails | 0 (fallback to needs_review) |
| AI emails sent without human review | 0 (drafts only) |
fetch_failed.needs_review and the team is alerted.| Tier | Rule | What happens |
|---|---|---|
| Hot | Score 70+ | CRM row, AI-written Gmail draft, Slack alert |
| Warm | Score 40-69 | CRM row, status nurture |
| Cold | Score below 40 | CRM row, status no_action |
| Spam | AI flags spam | CRM row, status spam |
| Needs review | AI call failed | CRM row and Slack review alert |

Gemini is given an exact JSON schema with field types and allowed values. The API enforces the format, so downstream nodes never break on malformed or chatty AI responses.