Webhook processing
Receive JSON requests, inspect incoming fields and return a controlled response to the calling system.
Modular workflows combining webhooks, JSON validation, Code nodes, conditional routing and integrations with connected services.
n8n combines visual orchestration with code and direct access to structured data, making each transformation and routing decision visible.
Receive JSON requests, inspect incoming fields and return a controlled response to the calling system.
Use JavaScript inside Code nodes to validate, normalise and enrich data before later workflow steps use it.
Select a route from the normalised data and connect the result to storage, notifications, APIs or other business services.
The lead-routing starter is included as an importable workflow. Additional cards describe patterns that can be added after credentials and connected services are configured.
Receives a lead through a webhook, validates the JSON payload, normalises the values and selects a processing queue.
A reusable pattern for combining multiple HTTP requests, transforming each response and producing one normalised result.
A workflow pattern for separating failed items, recording diagnostic information and notifying the responsible queue without losing context.
The starter workflow deliberately stops at a JSON response. Storage and email nodes should only be added after the relevant n8n credentials are configured.
The workflow receives an enquiry, checks the required fields, converts values to a consistent form and selects a queue based on the requested service.
The same validation and routing behaviour is reproduced locally, so the workflow can be inspected without exposing an n8n webhook publicly.
Change the service or enter an invalid email to see how the validator responds.
Successful input produces a normalised object and the name of the selected processing route.
{
"status": "Run the validator to inspect the result"
}
Import the JSON into n8n, inspect every node and test both valid and invalid webhook requests before marking the workflow as completed.
Webhook → JavaScript validation and routing → Respond to Webhook. The file contains no connected account credentials.
Add a screenshot after importing and successfully running the starter workflow.
assets/automations/n8n-lead-routing-workflow.pngCapture one valid route and one rejected request after testing the actual n8n workflow.
assets/automations/n8n-lead-routing-execution.png