{
  "name": "Dedupe a list with Dedupe.dev",
  "nodes": [
    {
      "parameters": {},
      "id": "9a1f4763-1b1a-4f0a-9e64-000000000001",
      "name": "Run",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [260, 300]
    },
    {
      "parameters": {
        "jsCode": "// Replace this node with your real source (a spreadsheet read, a database\n// query, a webhook body). It must output one item with a `data` string:\n// newline-separated values for lines mode, or a CSV string for rows mode.\nconst emails = [\n  'ann@example.com',\n  'bob@example.com',\n  'Ann@Example.com',\n  'carla@example.com',\n  'ann@example.com',\n];\nreturn [{ json: { data: emails.join('\\n') } }];"
      },
      "id": "9a1f4763-1b1a-4f0a-9e64-000000000002",
      "name": "Your list (sample data)",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [480, 300]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://dedupe.dev/api/dedupe",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ mode: 'lines', data: $json.data, options: { ignoreCase: true, trim: true } }) }}",
        "options": {}
      },
      "id": "9a1f4763-1b1a-4f0a-9e64-000000000003",
      "name": "Dedupe.dev API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [700, 300],
      "notes": "Paste your API key from https://dedupe.dev/app/keys into the Authorization header (or move it into an n8n Header Auth credential). The response has `result` (the deduplicated list), `kept`, and `removed`. For CSV use mode 'rows' with options.keyColumns; fuzzy matching is options.fuzzy with a threshold. Full reference: https://dedupe.dev/api"
    }
  ],
  "connections": {
    "Run": {
      "main": [
        [
          {
            "node": "Your list (sample data)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Your list (sample data)": {
      "main": [
        [
          {
            "node": "Dedupe.dev API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {},
  "pinData": {}
}
