Most B2B lead gen "case studies" are marketing theater. Vague percentages, no system, no numbers you can actually verify or replicate.
This is the opposite. Below is the exact automation stack we built for a mid-market B2B SaaS client, the failure points it fixed, and the ROI math. If you build automations, you can rebuild this.
The Starting Point
The client ran a decent inbound motion: content, paid search, a few thousand form fills a quarter. The problem wasn't traffic. It was leakage.
Here's what the data showed after we audited their funnel:
- Median lead response time: 19 hours
- Leads never contacted at all: 34%
- Enrichment before first touch: basically none
- Routing: a shared inbox and a prayer
The sales team wasn't lazy. They were drowning in unqualified noise and had no way to tell a tire-kicker from a $50k opportunity at the moment of submission.
Speed and signal were the two broken levers. So we fixed both.
The Architecture
The system is an event-driven pipeline. Form submit fires a webhook, and everything downstream happens in under 90 seconds. We built the orchestration in n8n with a couple of custom function nodes.
The flow:
- Capture — webhook receives the form payload
- Enrich — pull firmographic + intent data
- Score — deterministic rules + an LLM classifier for fit
- Route — hot leads to reps instantly, nurture the rest
- Personalize — draft a first-touch message tuned to the lead
The scoring step is where the 78% actually came from. Here's a simplified version of the classifier logic:
// Runs inside an n8n Function node after enrichment
const lead = $json;
function scoreLead(lead) {
let score = 0;
// Firmographic fit
if (lead.employeeCount >= 50) score += 25;
if (lead.industry && TARGET_ICP.includes(lead.industry)) score += 20;
if (lead.techStack?.includes('salesforce')) score += 15;
// Intent signals
if (lead.pageViews > 5) score += 10;
if (lead.visitedPricing) score += 20;
if (/(demo|pricing|trial)/i.test(lead.message || '')) score += 15;
// Negative signals
if (FREE_EMAIL_DOMAINS.includes(lead.emailDomain)) score -= 20;
if (lead.employeeCount < 10) score -= 15;
return Math.max(0, score);
}
const score = scoreLead(lead);
return {
...lead,
score,
tier: score >= 60 ? 'hot' : score >= 30 ? 'warm' : 'cold',
};
Deterministic rules handle the obvious cases fast and cheap. But rules miss nuance — a two-line message that screams buying intent, for example. So we layered an LLM on top for the ambiguous middle band.
import openai, json
def classify_intent(message: str, company_summary: str) -> dict:
prompt = f"""
Company: {company_summary}
Inbound message: "{message}"
Return JSON: buying_stage (research|evaluation|ready),
pain_point (one phrase), confidence (0-1).
"""
resp = openai.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": prompt}],
response_format={"type": "json_object"},
temperature=0,
)
return json.loads(resp.choices[0].message.content)
The LLM output feeds back into routing. A "ready" stage with high confidence bumps a warm lead to hot, so the rep gets it while the prospect is still on the site.
Why Speed Multiplied Everything
The enrichment and scoring were valuable. But the compounding factor was response time.
Hot leads now trigger an instant Slack alert to the assigned rep plus a pre-drafted, LLM-personalized email queued for one-click send. Median response time dropped from 19 hours to under 5 minutes for tier-one leads.
That single change is well documented in sales research: contacting a lead within 5 minutes versus 30 makes them dramatically more likely to convert. We just made it the default instead of the exception.
The Numbers
Over a 90-day window against the prior quarter's baseline:
- Qualified demos booked: +78%
- Lead-to-demo conversion: 6.2% → 11.1%
- Leads never contacted: 34% → 3%
- Rep time on manual triage: ~11 hrs/week → under 2
The 78% didn't come from more traffic. Same top of funnel. It came from stopping leakage and hitting leads while intent was hot.
The ROI Math
Build cost plus first-year tooling landed around $32k. The incremental demos, at their historical demo-to-close rate and average contract value, produced roughly $410k in new pipeline in the same period.
That's the part most "AI marketing" pitches skip. The model wasn't impressive because it was clever. It was impressive because we could tie every node in the pipeline to a dollar figure.
What Actually Transfers
If you're rebuilding this, three lessons matter more than the stack choice:
- Fix leakage before you buy traffic. A 34% no-contact rate is a bigger lever than any ad spend increase.
- Rules first, LLM second. Deterministic scoring is fast, free, and auditable. Use the model only where judgment is genuinely required.
- Optimize for time-to-first-touch. It's the cheapest 2x in B2B and almost nobody instruments it.
The automation is replicable in an afternoon. The discipline of measuring it in pipeline dollars is the part that makes it a case study instead of a demo.
Originally published at getmichaelai.com
Top comments (0)