AI Automation

An AI lead pipeline that scores ~170 opportunities a night, files them as CRM cards and drafts the first message

I built the lead and opportunity pipeline for my own consulting business: five sources feed a deterministic scoring rubric, qualified leads become ClickUp CRM cards and a headless Claude run drafts the first message before I wake up. About 170 opportunities are scored a night with zero manual effort. It only runs when new rows land, heals itself on transient failures, alerts me on real ones and costs less than five dollars a month in infrastructure. When I changed the rubric it re-scored 21,960 historical rows in one pass.

Headline result
~170 leads a night
Client
My own consulting business
My role
Designed, built and run it
Scope
5 sources, 6 stages, 21,960 historical rows
When
June - September 2026

The problem

Finding the right clients is a volume game with a quality problem. Hundreds of new leads a night across five sources, most of them wrong for me: wrong timezone, wrong scope, wrong budget signals. Reading them by hand cost hours and I still missed good ones. The ones I did find sat in a tab until I got around to writing something.

This is the same problem every sales team has with inbound. Too many leads, not enough judgment applied to each one and follow-up that depends on someone remembering.

I wanted the whole front half done by a system: collect, judge, file, draft. My work should start at review and send.

What I did

A six-stage pipeline that runs on a cloud server and only wakes up when there is new work. 5 scrapers in n8n → dedup in Supabase → deterministic score in Python → 5+ scores bridged to a tracker sheet → ClickUp CRM cards for 7+ → AI-drafted first message → Telegram summary.

A watcher checks every 10 minutes for unscored rows. Nothing new, it exits in under a second. Something new, it runs the whole chain for just those rows. Qualified leads land in my CRM with a drafted message attached and a one-line summary on my phone.

On top sits a weekly learning loop. Every lead I add by hand and every one I skip gets a reason. The loop reads those verdicts and proposes changes to the scraper queries and the rubric, backtested against the full history before anything ships.

How it works

01

Event-driven, not scheduled

The old version was four crons that had to run in the right order. If a scraper was late the scorer ran on nothing. Now one watcher triggers on new rows and the whole chain runs for exactly those rows. No more sync-the-cron-times bugs.

02

Scoring is arithmetic, not a model

The rubric is Python: title keywords, timezone, language requirements, rate signals, source context. Same input, same score, every time. When I changed the rubric I re-scored the whole history in one pass: 21,960 rows, 10,885 scores corrected.

03

AI writes the draft, code enforces the rules

The first message is drafted by a headless Claude run against a fact allowlist and a 60-word cap, then run through a deterministic voice gate that flags AI tells before it reaches me. I review and send. Nothing goes out on its own.

04

Self-healing by default

Every stage is wrapped so a checkup decides done, not exit code 0. Transient failures retry with backoff. Real failures alert me on Telegram. Anything that could double-send is alert-only, never a blind re-run.

05

It learns from my picks

Manual adds and skips are the training data. A weekly loop reads them and proposes rubric or query changes. A proposed change only ships if it provably would have scored past leads better. I see that delta before I approve.

06

Right-size the one paid tool

An audit caught the paid scraper running at roughly three times the budget I had set. A yield-weighted per-query budget plus a quality filter cut that cost by about 70% with the lead feed intact.

Results

  • ~170 opportunities scored a night, zero manual effort
  • 21,960 historical rows re-scored in one pass when the rubric changed, 10,885 scores corrected
  • 6-stage pipeline moved from fixed schedules to event-driven in a single day
  • Runs on less than five dollars a month of infrastructure
  • Qualified leads arrive as CRM cards with a drafted first message attached
  • Every drafted message passes a deterministic voice gate before I see it

What this means for your business

The same shape works for any inbound flow: partner leads, demo requests, support triage, applications to a program. Change the sources and the rubric, keep the machine. The part most teams skip is the scoring. If a human has to judge every lead, you do not have a pipeline, you have a queue. Happy to grab a call to see how leads come in today and where they stall.

Tools

  • n8n
  • Python
  • Supabase
  • Google Sheets
  • ClickUp
  • Claude Code
  • Telegram
  • Cloud server

Skills

  • AI Automation
  • Lead Scoring
  • Sales Pipeline Automation
  • CRM Automation
  • Business Process Automation
  • n8n
  • Workflow Automation
  • Marketing Operations
  • Revenue Operations

Questions

How do you build an AI lead scoring system that does not make things up?

Keep the model out of the scoring. The score is deterministic Python: same input, same score, every time. The model only writes the first message, against a fact allowlist with a word cap and a gate that flags AI tells. AI drafts, code enforces, a human sends.

What does an automated lead pipeline cost to run?

Mine runs on less than five dollars a month after I right-sized the one paid scraper. A small cloud server, n8n, Supabase and a headless Claude run. The expensive part is never the infrastructure. It is the hours a human spends reading leads that should have been filtered out.

Can this work for inbound sales leads instead of scraped ones?

Yes, that is the easier version. Swap the scrapers for a form, a CRM webhook or an inbox and keep the rest. Dedup, score, file the good ones, draft the first reply, alert a human. The machine does not care where the rows come from.

What happens when a step fails overnight?

A transient failure, like a provider timing out, retries with backoff and usually passes. A real failure sends me one Telegram line that says which stage and why. Anything that could send a message twice never retries on its own. It waits for me.