Lead intake and CRM
Lead intake that fills the CRM and never replies on its own
Every inbound lead is checked, scored, and recorded in Postgres and HubSpot without duplicates, and nothing in the workflow can write back to the lead.
How it fits together
Inputs
Site forms
Contact forms on the company's sites.
Chat agent leads
Contact details a site chat agent captures in conversation.
Forwarded email
Inquiries the support triage agent finds in the inbox.
Engine
Intake workflow
One n8n workflow receives every source, so every lead gets the same checks.
n8n
Check
A secret header and a honeypot field stop scripted submissions before any model runs.
Score
A small Claude model scores the lead against the ideal client profile.
- Claude
Dedupe
The HubSpot contact is matched by email. A deal opens only for a new contact, so a repeat inquiry never makes a second deal.
- HubSpot
Outputs
Lead record
The lead is saved in Postgres with the HubSpot id written back.
- PostgreSQL
CRM contact and deal
Website and industry land in real properties, and the deal starts at the first pipeline stage.
- HubSpot
Summary to the operator
A short summary posts to the leads topic for a person to act on.
Telegram
Guardrails
- No step can contact the lead
- Hard cap on submissions per hour
- Pipeline stages and properties set by a repeatable script
The problem
Leads arrive from forms, chat, and email, and each source tends to grow its own half-finished path into the CRM. The result is duplicate contacts, deals opened twice for the same person, and the risk of an automated reply that nobody reviewed.
What I built
- One authenticated intake path for every lead source, with a honeypot and a rate cap.
- Lead scoring against the ideal client profile by a small model.
- A HubSpot integration that dedupes contacts by email, opens a deal only for new contacts, and writes the CRM id back to the database.
- A setup script that makes the HubSpot pipeline stages mirror the lead status flow in the database and creates the custom properties, safe to run again.
How I built it
An n8n workflow with Postgres on Supabase as the system of record and HubSpot reached through a private app token that works only against the HubSpot API. The approval gate is structural: the workflow has no node that sends anything to the lead, so a person writes every reply.
What it shows
I connect agents to the business systems a company already runs, and I make the safe behavior a property of the workflow rather than a setting someone can forget.