Webhook in, DeepSeek classifies, the router branches on the verdict, JSON out. This is the exact flow we built and tested end to end on a local n8n instance (version 2.22.6) as a reference for automation work.
A POST /webhook/lead-qualify receives the lead payload (name, company, role, message, budget, timeline).
The workflow calls the DeepSeek chat completions API with a strict JSON prompt: score 0-100, tier HOT / WARM / COLD, one-sentence reason.
An IF node checks the model output for HOT and routes to the matching responder.
The webhook caller gets { qualified, source, ai } the same moment the call finishes.

Two live requests against the running instance. No mocks: the classify step hit the real API both times.
| Run | Input | Tier | Score | Response |
|---|---|---|---|---|
| #1 | VP Engineering, approved Q4 budget, 6-week timeline | HOT | 95 | qualified: true |
| #2 | Owner, no budget, "just browsing" | COLD | 10 | qualified: false |

The flow itself is four nodes and an afternoon. Getting a local n8n running the way we wanted took longer: native modules (sqlite3, isolated-vm) had to be rebuilt against the right Node version, the CLI import needs an explicit workflow id, and a published workflow only takes effect after a restart.
That is normal for automation work, and it is usually where projects stall. If a workflow of yours is stuck somewhere between "it worked yesterday" and "nobody knows why it stopped", that is the kind of thing we fix.
Diagnosis $99, repair with a 30-day warranty on the same root cause $299, or ongoing care from $200/month. Everything in writing, fully async.
Email [email protected]