n8n automation / Demo build
Lead Engine
Captures every new real-estate lead, scores it hot, warm or cold with AI, alerts the team and emails the lead within seconds.
- Type
- Demo build for a fictional real-estate team
- Runs on
- n8n, self-hosted with Docker and PostgreSQL
- Connects
- Claude Haiku 5.5, HubSpot, Slack, Gmail, Apify
The problem
Real-estate teams lose leads when replies are slow, duplicates pile up in the CRM, and nobody knows which inquiry to call first.
What each lead gets
| Lead | HubSpot | Slack | Email to the lead |
|---|---|---|---|
| Hot | Contact and a deal | Full alert: why it is hot, next action, budget, timeline and contact details | Thank-you within seconds. An agent will call today |
| Warm | Contact and a deal | One line to the team | Within seconds. Contact within one business day |
| Cold | Contact only | Nothing | Nothing |
- Stopped before scoring
- Seen beforeCounted as a repeat visit. No second deal, no second alert.
- No valid email or phoneRejected.
What I built
Scored with a reason
Claude Haiku 5.5 scores each new lead hot, warm or cold, with a reason and a suggested next step. It judges only the details given, never the name.
A person approves every outreach email
A Google Maps search finds referral partners in a city and AI drafts a short first email from the public listing alone. Nothing is sent until someone clicks Approve in Slack.
A summary every morning
At 08:00 Slack gets the last 24 hours: new leads by score and source, hot and warm leads by name, repeat inquiries and outbound activity.
Safe to test
One switch sends every email to a test inbox, so testing never emails a real person. Real outbound needs two separate switches turned on.
Built to fail loudly
Every external call gets three tries. Failures go to a central error log and a Slack warning.
Secured and capped
The webhook needs a secret header, and the AI treats what a lead writes as data, not instructions. Each paid map search is capped at $0.50.