Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Forms & Surveys

Forms & Surveys

Deduplicate CSV leads and rank key contacts with OpenRouter Claude Haiku

When a form is submitted, it processes form answers with OpenRouter and Claude.

What it does

## Deduplicate leads from CSV into one AI-ranked contact per company ### How it works This workflow accepts an uploaded spreadsheet or CSV of leads, reads the configured sheet, and groups rows by organization. For each company, it either auto-selects the only available contact or asks OpenRouter to rank multiple contacts and choose the most senior/best lead. It then merges the resolved contacts into a cleaned CSV and also generates a separate processing report. ### Setup steps - Configure the form trigger so users can upload the lead file in the expected CSV/XLSX format. - Set the Configuration node values, including sheetName, aiModel, and maxRowsInCleanedCSV. - Add OpenRouter API authentication for the HTTP Request node and confirm the selected model is available to your OpenRouter account. - Verify the input columns match the custom code expectations for organization, contact name, title, email, and any ranking fields used in the prompt. ### Customization Adjust the grouping logic, seniority ranking prompt, OpenRouter model, and row limit to match your lead source and desired definition of the best contact per company.

The steps

  1. When CSV Uploaded
  2. Set Workflow Parameters
  3. Extract Data from XLSX
  4. Group by Organization
  5. Check AI Ranking Requirement
  6. Prepare AI Prompt
  7. Post to OpenRouter API
  8. Match Contact from AI Response
  9. Select Single Contact
  10. Merge Contacts
  11. Export Contacts to CSV
  12. Compile Report Data
  13. Export Report to File
  14. Limit to Max Rows

Similar automations