Library / Lead Generation & Enrichment
Lead Generation & Enrichment
Validate lead intake records and route review outcomes with Code and Switch
Manually runs synthetic lead batches to normalize and validate fields, detect duplicates, and route each outcome to Decision nodes or manual review.
What it does
## Validate lead intake and route review outcomes with Code and Switch ### How it works Run Synthetic Preflight manually starts a batch of nine fictional leads. Generate Synthetic Examples supplies edge cases. Evaluate Lead Preflight normalizes text, email, phone, and UTM fields, validates event and contact fields, and detects repeated event IDs or emails within that batch. Route by Preflight Status sends eight statuses to Decision nodes that retain assessed fields and add route_decision. Unexpected statuses go to a manual-review fallback. ### Setup - Import this workflow into an isolated n8n instance and keep it inactive. - No credentials or external accounts are required. All nodes are built-in Manual Trigger, Code, Switch, Edit Fields (Set), or Sticky Note nodes. - Execute Run Synthetic Preflight manually, then inspect Evaluate Lead Preflight and the matching Decision outputs. - Expect nine assessed rows: two READY_FOR_REVIEW and one in each of the seven other named branches. Default fixtures do not invoke fallback. ### Customization and limits Add fictional cases in Generate Synthetic Examples. Duplicate checks reset each run. Email and phone checks validate format, not deliverability or ownership. This educational workflow makes no network requests, sends no messages, writes no CRM records, and is not a production lead-handling integration.
The steps
- Run Synthetic Preflight
- Generate Synthetic Examples
- Evaluate Lead Preflight
- Route by Preflight Status
- Decision: READY_FOR_REVIEW
- Decision: REVIEW_PHONE_ONLY
- Decision: HOLD_MISSING_CONTACT
- Decision: HOLD_BAD_EMAIL
- Decision: REVIEW_DUPLICATE_IN_BATCH
- Decision: REVIEW_SAME_EMAIL_IN_BATCH
- Decision: HOLD_INVALID_EVENT
- Decision: HOLD_MALFORMED_INPUT
- Unexpected Status: Hold For Review
Similar automations
AI Agents & AssistantsReview ad copy variants with Claude and route results to HubSpot and Slack34 stepsCode, Git & Developer ToolsTest candidate intake reliability with synthetic records on manual run3 stepsRAG & Knowledge BasesRecord Patient Intake in a CRM with Claude RAG11 stepsFinance, Invoices & AccountingExtract and post supplier invoices with AI, routing exceptions for review16 steps