{
  "name": "Enrich lead profiles from LinkedIn URLs with Apify and Google Sheets",
  "nodes": [
    {
      "id": "7f4c62ad-aa24-41f5-a28c-228d505d222e",
      "name": "When clicking 'Execute Workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -5584,
        416
      ]
    },
    {
      "id": "4daa223f-38f3-450e-b8f8-39fe456b88de",
      "name": "Process One Row at a Time",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -5072,
        304
      ]
    },
    {
      "id": "55b937aa-77fd-42f0-bb5d-01843f4ed5fa",
      "name": "Start Apify Scrape",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4720,
        512
      ]
    },
    {
      "id": "ec4c7c07-b02e-4f97-83a5-4e2f46501267",
      "name": "Store Run Info",
      "type": "n8n-nodes-base.code",
      "position": [
        -4512,
        512
      ]
    },
    {
      "id": "196a2f7b-d93c-46e5-a3cf-692bea44f6f0",
      "name": "Wait 15 Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        -4272,
        352
      ]
    },
    {
      "id": "7a1a58b1-f278-435b-9be8-2186707d42ce",
      "name": "Check Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4080,
        352
      ]
    },
    {
      "id": "df1282c2-b773-44ba-9a8e-b6976195d1c4",
      "name": "Update Loop Counter",
      "type": "n8n-nodes-base.code",
      "position": [
        -3856,
        352
      ]
    },
    {
      "id": "f389d47f-57a0-43bd-8e12-0b90faed9922",
      "name": "Check if Ready",
      "type": "n8n-nodes-base.if",
      "position": [
        -3664,
        352
      ]
    },
    {
      "id": "bda5be84-5090-493a-b7f2-0ff6d2638965",
      "name": "Check Max Retries",
      "type": "n8n-nodes-base.if",
      "position": [
        -3904,
        608
      ]
    },
    {
      "id": "0a8e0730-7c81-41ef-95b7-b78dd5070bcf",
      "name": "Fetch LinkedIn Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3088,
        448
      ]
    },
    {
      "id": "a856ba43-567a-45cc-aa77-5498c7d7f2e9",
      "name": "Prepare Error Message",
      "type": "n8n-nodes-base.code",
      "position": [
        -3664,
        624
      ]
    },
    {
      "id": "2cbb12b4-8e84-4583-a58d-d1bfa56f4c06",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2496,
        432
      ]
    },
    {
      "id": "9af0e302-ea01-4d9c-90d4-4c626a823643",
      "name": "Get Other Current Jobs",
      "type": "n8n-nodes-base.code",
      "position": [
        -2752,
        272
      ]
    },
    {
      "id": "22635c73-d866-4ddd-a979-2e8f780b24dc",
      "name": "Set Other Key LinkedIn Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -2752,
        608
      ]
    },
    {
      "id": "612e67e2-6c08-42ff-a14c-923c5bdc38fd",
      "name": "Get 2 Most Recent Posts",
      "type": "n8n-nodes-base.code",
      "position": [
        -2752,
        448
      ]
    },
    {
      "id": "5ff5b6cb-7b40-4a38-869b-0b042de50d4b",
      "name": "Get Rows - Not Enriched Yet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -5360,
        416
      ]
    },
    {
      "id": "916799c8-2973-442e-b685-6eca4e9af084",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6560,
        -400
      ],
      "parameters": {
        "width": 864,
        "height": 1072,
        "content": "# **Get Enriched Lead Profiles from LinkedIn URLs with Apify and Google Sheets**\n\nTransform LinkedIn profile URLs into comprehensive lead profiles automatically. Add URLs to your sheet, run the workfl"
      }
    },
    {
      "id": "65cec22e-438e-45b7-a105-fb681fd83cc3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5664,
        -400
      ],
      "parameters": {
        "width": 1344,
        "height": 512,
        "content": "## Sample Output\n\n**Google Sheet row output - from one successfully enriched lead profile via LinkedIn URL**:\n[Link to Google Sheets sample file](https://docs.google.com/spreadsheets/d/1kLOvqW5__U62Ii"
      }
    },
    {
      "id": "5e1ee124-d91a-4428-85fb-6f02dd335a54",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5664,
        144
      ],
      "parameters": {
        "width": 784,
        "height": 900,
        "content": "## 1. Input & Batch Processing\nFetches unenriched rows from Google Sheets and processes one LinkedIn URL at a time."
      }
    },
    {
      "id": "8af06cf7-5b87-4086-83e5-dc3e747da308",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4848,
        144
      ],
      "parameters": {
        "width": 1632,
        "height": 896,
        "content": "## 2. Apify Scraping & Polling\nTriggers LinkedIn profile scrape and polls for completion every 15 seconds for 20x attempts, logs an error if no successful response."
      }
    },
    {
      "id": "56ff5899-7ad2-46e5-874c-9d599eca3b38",
      "name": "Update Row in Google Sheet (2)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2288,
        736
      ]
    },
    {
      "id": "0395efb3-9c91-406a-82b1-b7abec5db05d",
      "name": "Update Row in Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -3424,
        624
      ]
    },
    {
      "id": "b9d873b8-f6e8-4110-b2b9-68b7ee1779e1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3184,
        144
      ],
      "parameters": {
        "width": 1120,
        "height": 896,
        "content": "## 3. Data Extraction & Output\nExtracts detailed profile outputs (name, job position, company, other roles, recent posts etc), and writes enriched data back to Google Sheets."
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Update Row in Google Sheet (2)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Status": {
      "main": [
        [
          {
            "node": "Update Loop Counter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Ready": {
      "main": [
        [
          {
            "node": "Fetch LinkedIn Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check Max Retries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Run Info": {
      "main": [
        [
          {
            "node": "Wait 15 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 15 Seconds": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Max Retries": {
      "main": [
        [
          {
            "node": "Wait 15 Seconds",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Apify Scrape": {
      "main": [
        [
          {
            "node": "Store Run Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch LinkedIn Data": {
      "main": [
        [
          {
            "node": "Get 2 Most Recent Posts",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Other Current Jobs",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set Other Key LinkedIn Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Loop Counter": {
      "main": [
        [
          {
            "node": "Check if Ready",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Error Message": {
      "main": [
        [
          {
            "node": "Update Row in Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Other Current Jobs": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get 2 Most Recent Posts": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Process One Row at a Time": {
      "main": [
        [],
        [
          {
            "node": "Start Apify Scrape",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Row in Google Sheet": {
      "main": [
        [
          {
            "node": "Process One Row at a Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Rows - Not Enriched Yet": {
      "main": [
        [
          {
            "node": "Process One Row at a Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Other Key LinkedIn Data": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Update Row in Google Sheet (2)": {
      "main": [
        [
          {
            "node": "Process One Row at a Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Execute Workflow'": {
      "main": [
        [
          {
            "node": "Get Rows - Not Enriched Yet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}