Skip to content
Menu
Home / Workflow

An n8n lead-intake workflow with validation and deduplication

Keep lead intake separate from enrichment and sending. Validate the record first, assign an idempotency key and return a clear response before handing it to downstream systems.

The short answer

Keep lead intake separate from enrichment and sending. Validate the record first, assign an idempotency key and return a clear response before handing it to downstream systems.

01Receive the event02Validate and normalize03Create an idempotency key04Check durable state05Route and monitor

1. Receive the event

Use a webhook with authentication at the edge or in n8n. For the downloadable template, the test payload is handled locally and returned without external writes. Configure authentication before exposing it.

2. Validate and normalize

Require a company domain and a contact identity. Normalize whitespace and domain casing, but do not assume an email with correct syntax is deliverable. Reject missing fields with an explicit error.

3. Create an idempotency key

Prefer the upstream event ID. If none is supplied, derive a stable key from your contact and event fields. The template returns that key; production deduplication needs a durable store and a uniqueness constraint.

4. Check durable state

Look up the key before making a paid request or writing to the CRM. Mark a record complete only after the downstream write succeeds. A failed attempt should remain recoverable.

5. Route and monitor

Send accepted records to a controlled enrichment or CRM workflow. Add an error destination and redact personal data from logs. Test a duplicate event and a malformed payload before turning it on.

Download the intake template

Import this JSON into n8n, inspect every node and test with dummy data. It validates syntax and returns a normalized record. Authentication and durable deduplication are not configured. The template has not been imported into a running n8n instance in this build.

Download n8n template (JSON)
{"email":"buyer@example.com","company_domain":"example.com","event_id":"demo-001"}

Questions buyers ask

Does the download contain API keys?

No. It is a minimal n8n intake template with a webhook, a validation Code node and a response node. It makes no external data requests or CRM writes.

Is the template production-ready?

It is a starting template, not a deployed integration. Configure authentication, durable deduplication and error monitoring, then validate it in your n8n edition before accepting real traffic.

Keep comparing

Sources and verification

Implementation documentation

n8n webhook documentation · n8n Code node