Lead Classification is Rule-Based Nuance
I spent years managing classic sales and marketing operations. A huge chunk of SDR (Sales Development Representative) hours was wasted on a simple, repetitive task: reading inbound form submissions, googling company size, funding stages, and geographic coordinates, and deciding whether to schedule a call or send them to a nurture sequence.
When Claude 3.5 Sonnet landed, I realized that we could replace this rule-based step with an autonomous decision agent. Here is the step-by-step breakdown of how we rewired the pipeline.
Step 1: Catching the Webhook
We set up a self-hosted n8n instance. The moment a user submits a form on the site, n8n catches the payload via a secure webhook listener. It parses the name, email, company website, and message.
Step 2: Background Data Enrichment
Before passing the lead to Claude, the n8n flow triggers a Node.js scraping script. The scraper queries public APIs and visits the company website to extract:
Step 3: LLM Intent Scoring
The scraped payload is fed directly to Claude 3.5 Sonnet with a strict system prompt. We instruct Claude to score the lead from 0 to 100 based on company size fit, clear pain points described in the message, and buyer intent. Claude outputs a structured JSON response:
{
"score": 85,
"category": "high-intent-enterprise",
"rationale": "Company has 150 employees, uses custom database triggers, and wants a sprint audit immediately."
}
Step 4: Intelligent Lead Routing
Based on the score, n8n routes the lead instantly:
The results spoke for themselves. In the first month, customer acquisition cost (CAC) fell 31% because reps spent 100% of their time talking to qualified buyers instead of filtering spreadsheets.