{
  "name": "Enrich Company Data from LinkedIn via Bright Data & Google Sheets",
  "nodes": [
    {
      "id": "aa049b35-0923-44ad-a750-ed8977df734b",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -380,
        380
      ]
    },
    {
      "id": "5782ed4a-bcba-410f-b783-38a6ffa39c76",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        60,
        380
      ]
    },
    {
      "id": "51684e89-da9e-4b33-a48c-bda72dfb0e17",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        960,
        820
      ]
    },
    {
      "id": "37d54ef1-f56b-49e5-aced-2770d472a3a0",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1100,
        820
      ]
    },
    {
      "id": "1b4e1b6b-569e-4edf-8cb5-d5b63f7b2d5a",
      "name": "LinkedIn Profile is Found?",
      "type": "n8n-nodes-base.if",
      "position": [
        1320,
        640
      ]
    },
    {
      "id": "433f25c7-d7da-4890-be0d-6c3c7a0d77f8",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1760,
        800
      ]
    },
    {
      "id": "0dbcc1b6-7610-4273-8456-c85212de4b53",
      "name": "Add Unique Result",
      "type": "n8n-nodes-base.set",
      "position": [
        1540,
        640
      ]
    },
    {
      "id": "96bda408-f0cb-4ce3-b3b5-6b6dfc2bafdb",
      "name": "Snapshot Progress",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        940,
        380
      ]
    },
    {
      "id": "ca614256-7b3c-45dd-89f7-70760acdaf8a",
      "name": "HTTP Request- Post API call to Bright Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        500,
        380
      ]
    },
    {
      "id": "eeb638d6-ecbc-4136-bb85-15dc4c6df6d4",
      "name": "Wait - Polling Bright Data",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        380
      ]
    },
    {
      "id": "96d0e0e0-f5b9-4659-bd56-6aef99cbdd75",
      "name": "HTTP Request - Getting data from Bright Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1380,
        380
      ]
    },
    {
      "id": "f27c0593-5155-429f-bb81-b4d55bebea69",
      "name": "Checking status of Snapshot - if data is ready or not",
      "type": "n8n-nodes-base.if",
      "position": [
        1160,
        380
      ]
    },
    {
      "id": "62ae1d4f-8b09-4629-aa79-1d718955cfcd",
      "name": "Code - Parse and Organize JSON Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1600,
        380
      ]
    },
    {
      "id": "42779d1f-4b94-4b35-aad6-1a4f95ad3d35",
      "name": "Code - Prepare Request Body for Bright Data",
      "type": "n8n-nodes-base.code",
      "position": [
        280,
        380
      ]
    },
    {
      "id": "cc629ea1-dd49-4f02-a31d-4288b957b10f",
      "name": "Add Empty result",
      "type": "n8n-nodes-base.set",
      "position": [
        1540,
        800
      ]
    },
    {
      "id": "cff46875-df95-4db2-afb7-62675c9118a1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        180
      ],
      "parameters": {
        "width": null,
        "height": 180,
        "content": "## Customization of the output data\nYou can modify the JSON keys in the code to include only the fields you want or add any additional. The current structure is a sample template."
      }
    },
    {
      "id": "c5bcbe49-328f-467d-a9b8-d32d1c4875a7",
      "name": "Extract Body from Response",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        640
      ]
    },
    {
      "id": "da01b056-0400-4879-8827-e4da705e014f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -20
      ],
      "parameters": {
        "width": 320,
        "height": 380,
        "content": "## Each Company is Processed Individually\nEvery company name from the Google Sheets column is processed in a separate loop.\n\nFor each company:\n- A unique Google search query is generated\n- The search "
      }
    },
    {
      "id": "587ffc7f-004b-47a0-b4a4-1d9001006b55",
      "name": "Append Results to Google Sheets table",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1820,
        380
      ]
    },
    {
      "id": "9c41c4d8-0174-402f-92a2-1b1d7506a57c",
      "name": "Read Company Names from Google Sheets table",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -160,
        380
      ]
    },
    {
      "id": "e108cf5d-802c-485e-b382-b5ba5bafa4b5",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        180
      ],
      "parameters": {
        "width": 320,
        "height": 180,
        "content": "## After Loop Completion \nAfter collecting all company URLs,\na single request body is prepared containing the list of companies.\nThis enables Bright Data to fetch and return dataset information for al"
      }
    },
    {
      "id": "07296185-f16e-4101-a764-de9406f115bf",
      "name": "Extract LinkedIn Url",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        940,
        640
      ]
    },
    {
      "id": "d0778ce9-580a-4514-90f4-4cd8018db2fc",
      "name": "Bright Data Web Request - Google Search for Company LinkedIn URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        500,
        640
      ]
    },
    {
      "id": "af3f6120-115a-420d-a00f-9c52300e3e67",
      "name": "Edit Company Search URL",
      "type": "n8n-nodes-base.set",
      "position": [
        280,
        640
      ]
    },
    {
      "id": "c1d2cb6a-1828-4c74-b710-50260f584eec",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        1000
      ],
      "parameters": {
        "width": 380,
        "height": 240,
        "content": "## Why Add an Empty Result?\nIf a LinkedIn company profile is not found,\nan empty result is added to the final output for that company.\nThis ensures all companies from the original list are represented"
      }
    },
    {
      "id": "f3249704-cfd8-4204-add2-a026d77e407e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        820
      ],
      "parameters": {
        "width": 300,
        "height": 280,
        "content": "## Replace YOUR_API_KEY\nReplace \"YOUR_API_KEY\" with your Bright Data web_unlocker API key in these nodes:\n**1.** Bright Data Web Request - Google Search for Company LinkedIn URL\n**2.** HTTP Request- P"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Code - Prepare Request Body for Bright Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Company Search URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Empty result": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Add Unique Result": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Snapshot Progress": {
      "main": [
        [
          {
            "node": "Checking status of Snapshot - if data is ready or not",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract LinkedIn Url": {
      "main": [
        [
          {
            "node": "LinkedIn Profile is Found?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Company Search URL": {
      "main": [
        [
          {
            "node": "Bright Data Web Request - Google Search for Company LinkedIn URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Extract LinkedIn Url",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Extract LinkedIn Url",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Extract Body from Response": {
      "main": [
        [
          {
            "node": "Extract LinkedIn Url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LinkedIn Profile is Found?": {
      "main": [
        [
          {
            "node": "Add Unique Result",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add Empty result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait - Polling Bright Data": {
      "main": [
        [
          {
            "node": "Snapshot Progress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Read Company Names from Google Sheets table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Parse and Organize JSON Data": {
      "main": [
        [
          {
            "node": "Append Results to Google Sheets table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request- Post API call to Bright Data": {
      "main": [
        [
          {
            "node": "Wait - Polling Bright Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Prepare Request Body for Bright Data": {
      "main": [
        [
          {
            "node": "HTTP Request- Post API call to Bright Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Company Names from Google Sheets table": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Getting data from Bright Data": {
      "main": [
        [
          {
            "node": "Code - Parse and Organize JSON Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Checking status of Snapshot - if data is ready or not": {
      "main": [
        [
          {
            "node": "Wait - Polling Bright Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request - Getting data from Bright Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bright Data Web Request - Google Search for Company LinkedIn URL": {
      "main": [
        [
          {
            "node": "Extract Body from Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}