Inbound Lead Qualification: n8n Workflow
A 15-node n8n workflow that validates, scores, deduplicates and routes inbound leads. The JavaScript inside its Code nodes is extracted and executed by a 22-test suite, so the logic is verified rather than merely drawn.
This is a working demonstration, not a client engagement. The brand and data are fictional.
My role
Sole author
- Designed and wrote the 15-node workflow as importable n8n JSON
- Wrote the validation, scoring, deduplication and routing logic in the Code nodes
- Built a test harness that reads the workflow file, extracts each Code node's JavaScript and executes it with stubbed n8n globals, so the tests run the real code rather than a copy
- Wrote 22 tests covering a hot lead, a cold lead, an invalid submission and the deduplication window
- Drew the workflow diagram as SVG and documented the required credentials by name only

