{
  "name": "Extract ICP-targeted LinkedIn leads from post comments using Apify",
  "nodes": [
    {
      "id": "83546292-c6cc-46c6-b47b-8a798912be2f",
      "name": "Sticky Note - Section 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        640
      ],
      "parameters": {
        "width": 392,
        "height": 372,
        "content": "## 1. User Input Form\nCollects the LinkedIn post URL and ICP filtering criteria (job titles and target countries) from the user."
      }
    },
    {
      "id": "b4550385-fe87-4424-b203-c769e6f72d7e",
      "name": "Sticky Note - Section 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        640
      ],
      "parameters": {
        "width": 984,
        "height": 372,
        "content": "## 2. Scrape Comments with Pagination\nFetches all comments from the LinkedIn post using Apify. Handles pagination automatically to retrieve up to 1,000 comments."
      }
    },
    {
      "id": "3b03345d-0e16-4e5a-85d7-c062dfd86c67",
      "name": "Sticky Note - Section 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        16
      ],
      "parameters": {
        "width": 1164,
        "height": 564,
        "content": "## 3. Deduplicate & Enrich Profiles\nRemoves duplicate commenters and enriches each unique profile with detailed LinkedIn data including job titles, location, and company information."
      }
    },
    {
      "id": "703d388b-24b0-4536-9179-97246c52beb3",
      "name": "Sticky Note - Section 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3072,
        16
      ],
      "parameters": {
        "width": 896,
        "height": 324,
        "content": "## 4. Filter & Export Leads\nFilters enriched profiles against your ICP criteria and exports matching leads as a downloadable CSV file."
      }
    },
    {
      "id": "5038a982-ab86-46d3-800a-c3b3f08ecbbd",
      "name": "Sticky Note - Warning",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2480,
        400
      ],
      "parameters": {
        "width": 280,
        "height": 140,
        "content": "### ⚠️ API Costs\nApify charges per API call. Each profile enrichment is a separate call. Monitor your Apify usage to manage costs effectively."
      }
    },
    {
      "id": "58b19d9b-46fa-45f1-a92d-2ff701301770",
      "name": "Prepare Pagination Requests",
      "type": "n8n-nodes-base.code",
      "position": [
        1456,
        768
      ]
    },
    {
      "id": "25a3cd32-ac72-4f23-be8d-f9e8c4a4344d",
      "name": "Loop Through Pages",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1680,
        768
      ]
    },
    {
      "id": "4c7e03a5-6658-434f-aca4-fe97ad8fc0bd",
      "name": "Scrape LinkedIn Comments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1904,
        784
      ]
    },
    {
      "id": "21112269-42ca-4b15-affb-a4eac8ab70d4",
      "name": "Check for More Pages",
      "type": "n8n-nodes-base.code",
      "position": [
        2128,
        784
      ]
    },
    {
      "id": "7cb7d4ea-a278-447c-987d-51c8ebd8655b",
      "name": "Remove Duplicate Commenters",
      "type": "n8n-nodes-base.code",
      "position": [
        1904,
        112
      ]
    },
    {
      "id": "9cae4959-0cf4-4e71-902f-ca75fc169384",
      "name": "Enrich LinkedIn Profile",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2576,
        208
      ]
    },
    {
      "id": "fc10825e-4a95-4e4d-aaf8-632e9fc8abb4",
      "name": "Filter by ICP Criteria",
      "type": "n8n-nodes-base.code",
      "position": [
        3104,
        96
      ]
    },
    {
      "id": "8aa8e1b8-2156-44ce-b02e-e37689b83aa7",
      "name": "Aggregate Matched Leads",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3328,
        96
      ]
    },
    {
      "id": "e4c5e020-4e1f-4c77-84ad-50c18097f14c",
      "name": "ICP Lead Extractor Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        1168,
        768
      ]
    },
    {
      "id": "1f8b597a-74ea-481c-a191-0d634fbad238",
      "name": "Attach ICP Criteria to Profiles",
      "type": "n8n-nodes-base.code",
      "position": [
        2128,
        112
      ]
    },
    {
      "id": "9310e647-e69c-4727-92de-1b1620037f7e",
      "name": "Loop Through Profiles",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2352,
        112
      ]
    },
    {
      "id": "feb1028d-c4f1-4ca0-b881-49dc28ca5ba0",
      "name": "Preserve ICP Criteria",
      "type": "n8n-nodes-base.code",
      "position": [
        2816,
        208
      ]
    },
    {
      "id": "a3b1116c-4b4c-49f5-8a67-2e13084989d1",
      "name": "Format Leads for CSV",
      "type": "n8n-nodes-base.code",
      "position": [
        3552,
        96
      ]
    },
    {
      "id": "27306d00-7f50-4de0-912b-c6ff17f7f56e",
      "name": "Export to CSV",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        3776,
        96
      ]
    },
    {
      "id": "f27ee8df-c30a-4fbe-b346-5717e27622a6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        304
      ],
      "parameters": {
        "width": 560,
        "height": 704,
        "content": "## LinkedIn ICP Lead Extractor\n\nThis workflow extracts qualified leads from LinkedIn post comments based on your Ideal Customer Profile (ICP) job titles and countries.\n\n### How it works\n1. Submit a Li"
      }
    }
  ],
  "connections": {
    "Loop Through Pages": {
      "main": [
        [
          {
            "node": "Remove Duplicate Commenters",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Scrape LinkedIn Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for More Pages": {
      "main": [
        [
          {
            "node": "Loop Through Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Leads for CSV": {
      "main": [
        [
          {
            "node": "Export to CSV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Through Profiles": {
      "main": [
        [
          {
            "node": "Filter by ICP Criteria",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Enrich LinkedIn Profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Preserve ICP Criteria": {
      "main": [
        [
          {
            "node": "Loop Through Profiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by ICP Criteria": {
      "main": [
        [
          {
            "node": "Aggregate Matched Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Matched Leads": {
      "main": [
        [
          {
            "node": "Format Leads for CSV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich LinkedIn Profile": {
      "main": [
        [
          {
            "node": "Preserve ICP Criteria",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ICP Lead Extractor Form": {
      "main": [
        [
          {
            "node": "Prepare Pagination Requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape LinkedIn Comments": {
      "main": [
        [
          {
            "node": "Check for More Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Pagination Requests": {
      "main": [
        [
          {
            "node": "Loop Through Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicate Commenters": {
      "main": [
        [
          {
            "node": "Attach ICP Criteria to Profiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Attach ICP Criteria to Profiles": {
      "main": [
        [
          {
            "node": "Loop Through Profiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}