Clean and deduplicate lead lists and export a review CSV file
Go to WorkflowDescription
Quick overview
This workflow takes a JSON lead list, normalizes email and website fields, validates basic email syntax, flags duplicates by email or domain, and exports a CSV review file with an accepted/duplicate/review status for each row.
How it works
Runs manually to process the sample input or your edited lead list.
Validates that the input contains 1–5000 lead records and that the deduplication mode is set to email or domain.
Normalizes each lead by trimming text, lowercasing emails, extracting a website hostname as a domain, and checking basic email syntax.
Classifies each row as accepted, duplicate, or review based on invalid/missing fields and whether the email or domain has already appeared in the current run.
Exports all rows to a downloadable CSV file that includes status, reason, and (for duplicates) the row number of the original record.
Setup
In the “Edit lead list and rules” step, replace the sample leads array with your own records using the same field names (company, email, website).
Set deduplicateBy to email or domain depending on how you want duplicates detected.
Execute the workflow and download clean-leads.csv from the final CSV export step.
Requirements
Built-in n8n nodes only; no credentials, API services or external accounts required. Processes 1–5000 records per run.
Customization
Choose email or exact normalized hostname deduplication in Edit lead list and rules. Replace the fictional sample records while retaining company, email and website field names.
Additional info
Email checks validate syntax only, not mailbox deliverability. Matching is limited to the current run, not a persistent CRM. Review every exported status before importing elsewhere. Processing logic and edge cases were tested locally; full n8n runtime execution has not yet been verified.