The story
The problem
A B2B SaaS sales team was spending more than six hours a day manually qualifying inbound leads. Leads arrived from web forms, email, paid campaigns, and partner integrations, but there was no consistent scoring model. High-value leads sat in the same queue as low-fit ones, and response delays caused the company to lose opportunities to faster competitors.
The approach
I built an automated lead qualification engine that scores, enriches, categorizes, and routes every lead in real time. The goal was to remove the repetitive triage work while surfacing the right leads to sales within minutes of submission.
Architecture
The system is built around an n8n workflow that receives leads from multiple sources through webhooks and API integrations. Each lead is enriched with company data, then scored by an LLM against an ideal customer profile that includes company size, industry, budget signals, and engagement patterns. The scoring model outputs a numeric score and a short rationale. High-scoring leads are routed to the CRM and to a Slack channel with an AI-generated briefing. Lower-scoring leads enter an automated nurture sequence. The whole pipeline is idempotent, with retries and a dead-letter queue for failures.
Integrations and observability
HubSpot receives the scored lead record and a set of custom properties. Sentry and execution logs track errors and scoring anomalies. The workflow exports to version-controlled JSON and is deployed to a self-hosted n8n instance. A React dashboard provides visibility into pipeline health, conversion rates, and score distribution over time.
Results
The qualification bottleneck disappeared. The sales team now spends its time on leads that have already been scored and briefed, response time dropped to minutes, and the lead-to-close rate improved because the right prospects were reached faster. The system runs continuously without human intervention.
What made it hard
Scoring Accuracy
Developing an AI scoring model that aligned with the client's ideal customer profile
Integration Complexity
Connecting multiple data sources and CRM systems reliably
Real-time Processing
Ensuring leads are scored and routed within minutes of submission