How-to
How to automate lead qualification with AI agents
Lead qualification suits an agent because the input is messy prose and the decision is a judgment — exactly where rule-based routing gets brittle. The pattern is one agent and a trigger, and the whole value is in the summary it writes rather than the score it assigns.
I built the pieces below, and the honest caveat is in the last section: a score is only as good as the definition you gave it, and you will not get that right first time.
Build it
- Create a **Qualifier** agent. In its Configuration box, set `system_prompt` to judge fit, intent and urgency, and to return structured JSON so a later step can branch on the fields.
- Tell it to write a two-line summary as well as a score — the summary is what makes the notification worth reading.
- Give it `http_request` if it should enrich the lead from your own system or CRM.
- Give it `slack_message`, `send_email` or `telegram_message` to notify whoever owns the follow-up.
- Add a Webhook trigger and have your form or CRM POST the lead to it, so the run starts the moment the lead arrives.
- Read the first twenty and correct the prompt. The definition of “hot” is yours, not the model’s.
| Band | Define it as | The failure if you do not |
|---|---|---|
| Hot | Right size, clear intent, a timeframe named | Everything enthusiastic reads hot |
| Warm | Right fit, no timeframe or no budget signal | Becomes the default, and the band stops meaning anything |
| Cold | Say plainly that most leads are cold | An agent asked to be helpful avoids the word |
Why structured output matters more here than elsewhere
If you want the workflow to treat hot leads differently, a condition has to read the score. A condition cannot reliably read a sentence, so turn on structured JSON output and have the agent return fields — then branch on them.
Without that you get a nicely worded paragraph nothing downstream can act on, which is the most common way this pattern quietly becomes a notification firehose.
What it costs per lead
A single reasoning step over a form submission is at the cheap end: comparable worked examples come to $0.0144 at our real rates when they answer and $0.0024 when they fail early. Source: both costed step by step, no signup needed.
So a thousand leads a month is a couple of dollars of usage. The free allowance is 100 runs or $0.50 a day, whichever comes first — enough to qualify a normal week of inbound while you are still deciding whether it works.
Where lead scoring goes wrong
Everything comes back warm
A vague system_prompt produces vague scores, and an agent asked to be helpful will avoid saying "cold". Define the three bands with an example of each in the prompt, and say explicitly that most leads are cold.
It scores on enthusiasm rather than fit
A long, keen enquiry from someone who cannot buy reads as hot. State the disqualifiers — wrong size, wrong region, no budget signal — as plainly as the qualifiers.
It runs for a month and routes nothing
If the branch condition can never match, every run still finishes as COMPLETED. Source: 27 branches of mine did this for weeks. Check the step rows for skipped steps, and have the run report how many leads it routed rather than trusting the status.
Next
- Enrich from your own data — see How to connect AI agents to your APIs.
- Branch on the score — see Build a multi-agent workflow.