Templates / Deduplicate CSV leads and rank key contacts with OpenRouter Claude Haiku

Deduplicate CSV leads and rank key contacts with OpenRouter Claude Haiku

Ready for 3.0

by Fafa Modey ✓ · 3 views · created 2026-08-31 · Lead Generation, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 14 nodes and runs when someone submits an n8n form (“Upload Leads File”). It uses only n8n's built-in nodes. It also calls openrouter.ai over HTTP.

How it runs

Trigger: When someone submits an n8n form (“Upload Leads File”).

  1. Set Workflow Parameters (Edit Fields (Set)): sets 3 fields: sheetName, aiModel, maxRowsInCleanedCSV
  2. Extract Data from XLSX (Extract from File): extracts data from a file (xlsx)
  3. Group by Organization (Code): runs custom JavaScript code
  4. Limit: keeps the first few items
  5. Compile Report Data (Code): runs custom JavaScript code
  6. Check AI Ranking Requirement (If): checks a condition and branches into true / false
  7. Export Report to File (Convert to File): converts data to a file (to json)
  8. Prepare AI Prompt (Code): runs custom JavaScript code
  9. Select Single Contact (Code): runs custom JavaScript code
  10. Post to OpenRouter API (HTTP Request): calls openrouter.ai (POST)

…plus 3 more steps. See the full node list below.

HTTP calls to: openrouter.ai

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 (9)

From the author

Quick overview This workflow accepts a uploaded CSV/XLSX leads file, groups rows by organization, and deduplicates to one contact per company. If multiple named contacts exist, it calls OpenRouter (chat completions) to pick the most senior person, then…

Excerpt from Fafa Modey's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.