{
  "id": "TEAiHqCvRgzgyRs0",
  "name": "Generate B2B Leads Daily with DataForB2B and LinkUp",
  "tags": [],
  "nodes": [
    {
      "id": "s1",
      "name": "Sticky \u2014 About",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        48
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 300,
        "content": "## \ud83c\udfaf B2B lead generation on autopilot\n\nEvery weekday morning this workflow:\n1. Finds fresh leads matching your ICP with **DataForB2B** (800M+ profiles, 50+ filters)\n2. Skips anyone already contacted (persistent memory)\n3. Sends up to **10 personalized connection requests/day** via **LinkUp API** \u2014 safe daily limits\n\nNo AI key needed. Perfect first step before message sequences."
      },
      "typeVersion": 1
    },
    {
      "id": "s2",
      "name": "Sticky \u2014 Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        48
      ],
      "parameters": {
        "color": 4,
        "width": 480,
        "height": 340,
        "content": "## \u2699\ufe0f Setup (5 min)\n\n1. **DataForB2B**: create a free API key at [app.dataforb2b.ai](https://app.dataforb2b.ai) \u2192 add credentials on the search node\n2. **LinkUp API**: get your key at [app.linkupapi.com](https://app.linkupapi.com) and connect your account \u2192 add credentials on the invite node\n3. Edit the **ICP filters** (title, country, industry, company size, funding...)\n4. Personalize the **invitation note** in the last node\n5. Activate \u2705\n\n\u26a0\ufe0f Keep the daily cap \u2264 15 for account safety."
      },
      "typeVersion": 1
    },
    {
      "id": "trigger-1",
      "name": "Every weekday 9am",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -64,
        432
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * 1-5"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d4b2b-search",
      "name": "DataForB2B \u2014 Search ICP leads",
      "type": "n8n-nodes-dataforb2b.dataForB2B",
      "position": [
        160,
        432
      ],
      "parameters": {
        "count": 25,
        "peopleFilters": {
          "conditions": [
            {
              "value": "Head of Sales"
            },
            {
              "field": "profile_country",
              "value": "United States",
              "operator": "eq"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "normalize-1",
      "name": "Normalize leads",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        432
      ],
      "parameters": {
        "jsCode": "// Flatten the DataForB2B response and normalize fields (works with any response shape)\nconst out = [];\nfor (const item of $input.all()) {\n  const j = item.json;\n  const arr = Array.isArray(j) ? j : (j.results || j.profiles || j.people || j.data || j.items || ((j.linkedin_url || j.profile_url || j.public_identifier) ? [j] : []));\n  for (const p of arr) {\n    const url = p.linkedin_url || p.linkedinUrl || p.profile_url || p.profileUrl || p.url || (p.public_identifier ? `https://www.linkedin.com/in/${p.public_identifier}` : null);\n    if (!url) continue;\n    const fullName = p.full_name || p.name || `${p.first_name || ''} ${p.last_name || ''}`.trim();\n    out.push({ json: {\n      linkedin_url: url,\n      full_name: fullName,\n      first_name: p.first_name || p.firstName || fullName.split(' ')[0] || '',\n      headline: p.headline || p.current_title || p.title || '',\n      company: p.current_company || p.company || p.company_name || '',\n      location: p.profile_location || p.location || p.profile_country || ''\n    }});\n  }\n}\nreturn out;"
      },
      "typeVersion": 2
    },
    {
      "id": "dedupe-1",
      "name": "Skip already contacted",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        608,
        432
      ],
      "parameters": {
        "options": {
          "historySize": 5000
        },
        "operation": "removeItemsSeenInPreviousExecutions",
        "dedupeValue": "={{ $json.linkedin_url }}"
      },
      "typeVersion": 2
    },
    {
      "id": "limit-1",
      "name": "Daily cap (10)",
      "type": "n8n-nodes-base.limit",
      "position": [
        832,
        432
      ],
      "parameters": {
        "maxItems": 10
      },
      "typeVersion": 1
    },
    {
      "id": "linkup-invite",
      "name": "LinkUp \u2014 Send connection request",
      "type": "n8n-nodes-linkupapi.linkup",
      "onError": "continueRegularOutput",
      "position": [
        1040,
        432
      ],
      "parameters": {
        "resource": "network",
        "advancedOptions": {},
        "sendConnectionParams": {
          "profileUrl": "={{ $json.linkedin_url }}"
        }
      },
      "credentials": {
        "linkupApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "c398267e-05c7-4bad-9037-0a4c662a1da8",
  "connections": {
    "Daily cap (10)": {
      "main": [
        [
          {
            "node": "LinkUp \u2014 Send connection request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize leads": {
      "main": [
        [
          {
            "node": "Skip already contacted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every weekday 9am": {
      "main": [
        [
          {
            "node": "DataForB2B \u2014 Search ICP leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Skip already contacted": {
      "main": [
        [
          {
            "node": "Daily cap (10)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DataForB2B \u2014 Search ICP leads": {
      "main": [
        [
          {
            "node": "Normalize leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}