Validate lead intake and route review outcomes with Code and Switch
Ready for 3.0What this workflow does
This workflow has 13 nodes and runs manually, when you click “Execute workflow”. It uses only n8n's built-in nodes.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Generate Synthetic Examples (Code): runs custom JavaScript code
- Evaluate Lead Preflight (Code): runs custom JavaScript code
- Route by Preflight Status (Switch): routes items into 8 branches
- Decision: READY_FOR_REVIEW (Edit Fields (Set)): sets 1 field: route_decision
- Decision: REVIEW_PHONE_ONLY (Edit Fields (Set)): sets 1 field: route_decision
- Decision: HOLD_MISSING_CONTACT (Edit Fields (Set)): sets 1 field: route_decision
- Decision: HOLD_BAD_EMAIL (Edit Fields (Set)): sets 1 field: route_decision
- Decision: REVIEW_DUPLICATE_IN_BATCH (Edit Fields (Set)): sets 1 field: route_decision
- Decision: REVIEW_SAME_EMAIL_IN_BATCH (Edit Fields (Set)): sets 1 field: route_decision
- Decision: HOLD_INVALID_EVENT (Edit Fields (Set)): sets 1 field: route_decision
…plus 2 more steps. See the full node list below.
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (4)
- Manual Trigger
n8n-nodes-base.manualTrigger - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Edit Fields (Set)
n8n-nodes-base.set
From the author
Quick overview For sales operations builders and n8n learners, this credential-free educational workflow demonstrates how to diagnose malformed or incomplete lead payloads before designing a CRM handoff. It runs nine fictional examples and produces…