{"product_id":"n8n-csv-lead-cleanup-deduplicate-contacts-by-company","title":"n8n CSV Lead Cleanup: Deduplicate Contacts by Company","description":"\u003ch3\u003eAutomatically deduplicate your lead CSV\/XLSX—one best contact per company\u003c\/h3\u003e\n\u003cp\u003eStop cleaning spreadsheets by hand. This n8n workflow uploads your leads file, groups rows by organization, and deduplicates contacts so you end up with a \u003cem\u003ecleaned CSV\u003c\/em\u003e containing \u003cstrong\u003eone contact per company\u003c\/strong\u003e—optionally using \u003cstrong\u003eOpenRouter\u003c\/strong\u003e to choose the most senior named contact when multiple people appear.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIngests your leads file\u003c\/strong\u003e via an n8n Form trigger (CSV\/XLSX) along with a \u003cstrong\u003eMax Rows in Cleaned CSV\u003c\/strong\u003e limit.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts and groups data\u003c\/strong\u003e from the spreadsheet, then groups records by \u003cstrong\u003eorganization\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDeduplicates per company\u003c\/strong\u003e by identifying repeated people\/roles and marking entries as \u003cstrong\u003eNamed\u003c\/strong\u003e or \u003cstrong\u003eGeneric\u003c\/strong\u003e when no person name exists.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProcesses only up to your configured limit\u003c\/strong\u003e for the cleaned output, while a separate branch computes a full-file summary report.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI-assisted seniority selection (OpenRouter)\u003c\/strong\u003e: if a company has multiple candidate named contacts, the workflow calls OpenRouter (chat completions) to select the most senior person.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExports results\u003c\/strong\u003e by merging AI-selected and directly selected contacts into \u003cstrong\u003ecleaned_leads.csv\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates a report\u003c\/strong\u003e by converting cleanup metrics into \u003cstrong\u003ecleanup_report.json\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eClean exported lead lists before importing into your CRM.\u003c\/li\u003e\n  \u003cli\u003eStandardize “multiple entries per company” data from sales sourcing tools.\u003c\/li\u003e\n  \u003cli\u003eRemove duplicates while preserving the most relevant decision-maker contact.\u003c\/li\u003e\n  \u003cli\u003eRun repeatable CSV deduplication as part of an n8n automation pipeline.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenRouter setup\u003c\/strong\u003e: add an OpenRouter API key to n8n using HTTP Header Auth (\u003ccode\u003eAuthorization: Bearer YOUR_KEY\u003c\/code\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eConfiguration\u003c\/strong\u003e: set the Excel sheet name (for XLSX) and choose the OpenRouter model ID.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWorkflow nodes\u003c\/strong\u003e used include: if, set, code, limit, merge, and sticky note.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003ePerfect for n8n users, automation engineers, and SaaS operators who need fast, reliable \u003cstrong\u003eCSV lead cleanup\u003c\/strong\u003e with \u003cstrong\u003ededuplication by company\u003c\/strong\u003e.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45962321592499,"sku":"N8N-18918","price":50.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/Y2iFfsC-AOdhW7xdm2dCA_zTb6c3We.png?v=1788600308","url":"https:\/\/buyflowscripts.com\/products\/n8n-csv-lead-cleanup-deduplicate-contacts-by-company","provider":"N8N Commerce","version":"1.0","type":"link"}