Skip to product information

n8n Webhook Lead Scoring & Routing with JavaScript Rules

n8n Webhook Lead Scoring & Routing with JavaScript Rules

 (200+Reviews)
Regular price £4.99
Regular price £4.99 Sale price
SAVE Sold out
Instant Digital Download
Unlimited Downloads
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
23 people viewing
High interest right now
9 added today
Fast-moving digital product
n8n Webhook Lead Scoring & Routing with JavaScript Rules

n8n Webhook Lead Scoring & Routing with JavaScript Rules

Regular price £4.99
Regular price £4.99 Sale price
SAVE Sold out

Score every incoming lead instantly—then route it to the right response in n8n

This n8n Webhook Lead Scoring & Routing workflow receives lead submissions via an n8n webhook, validates and scores them using custom JavaScript rules, and responds immediately with JSON for invalid, hot, or nurture leads. No manual triage—just smart routing and clear scoring in the same request.

What this workflow does

  • Receives a POST request on the webhook endpoint (for the /lead-intake path), including lead fields such as name, email, company, budget, and timeline.
  • Loads configurable scoring settings, including hot/warm thresholds, budget breakpoints, and a list of free email domains.
  • Normalizes and validates input (including name and email format).
  • Calculates a lead score based on budget, whether a company is present, whether the email domain is a business domain vs. a free domain, and the timeline.
  • Classifies leads as hot/warm/cold, then routes:
    • Invalid leads to an error path and returns a 422 JSON response.
    • Valid leads to either a sales-now route (hot) or a nurture path (non-hot).
  • Responds with JSON for accepted leads, including the chosen route and the computed score.

Use cases

  • Prioritize SaaS inbound leads by budget, business email domain, and timeline.
  • Immediately reject malformed submissions with a 422 response.
  • Send “sales-now” only for high-fit leads, while routing others to nurture.
  • Use consistent lead scoring across web forms or other lead sources that POST JSON.

Technical details

  • Nodes/parts used: webhook, code (JavaScript rules), set, switch, sticky note, respond to webhook.
  • Configuration: adjust thresholds, budget values, and the free email domain list in the Settings node.
  • Response behavior: returns 422 JSON for invalid leads; returns route + score for accepted leads.
View full details