{
  "name": "Automate LinkedIn candidates sourcing with Google X-ray Boolean search",
  "nodes": [
    {
      "id": "16a5f4a2-6e00-40f5-bab7-35526550eacd",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        3240,
        -280
      ]
    },
    {
      "id": "f9ff2e4f-176b-453d-8743-cab4d9fd408d",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        1040,
        -180
      ]
    },
    {
      "id": "b988c049-2400-4a3a-b615-f4048832bd8d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        -340
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Click \"Open Chat\" after activating the workflow.\n\nHere, paste in a job description or describe your ideal candidate."
      }
    },
    {
      "id": "74cec892-07d6-4e7d-9c6f-becfb51241c8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        -300
      ],
      "parameters": {
        "width": 300,
        "height": null,
        "content": "Under \"Credential to connect with\" add your openAI API key. Find at: https://platform.openai.com/settings/organization/api-keys\n"
      }
    },
    {
      "id": "940373af-ca88-44f1-b3c3-fb125ab6daf9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2800,
        -360
      ],
      "parameters": {
        "width": 300,
        "height": null,
        "content": "For the first condition: {{ $json.start }} is less than 50, so change \"50\" to your desired number of results. \n\nEach loop fetches the next page, returning 10 results per iteration."
      }
    },
    {
      "id": "c2bc0757-753b-4fee-b42b-65e5a0ff4750",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3160,
        -440
      ],
      "parameters": {
        "width": 200,
        "height": null,
        "content": "Waits 5 seconds to avoid rate limiting by Google. While it's unlikely you'll be rate-limited since you're authenticated with your cookie, this is just a precaution."
      }
    },
    {
      "id": "9007b42b-1a79-4b98-9d75-71894d660c1d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3400,
        -600
      ],
      "parameters": {
        "width": 380,
        "height": 280,
        "content": "Get this Cookie-Editor. https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm\n\nDo a google search --> click this extension --> Export --> Header string.\n\nThen, open t"
      }
    },
    {
      "id": "b1d2f9dd-227d-4372-89f8-e6d54e94f2fc",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -320
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Connect your google sheets account and create a document."
      }
    },
    {
      "id": "df0fb397-55d0-41ec-a9df-2c39019ad68e",
      "name": "Create a new sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1740,
        -180
      ]
    },
    {
      "id": "678a0b65-de67-41f0-ada6-23cef1226228",
      "name": "Add columns to new sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2220,
        -180
      ]
    },
    {
      "id": "767491ab-f7dd-4e23-816b-840bc24e5268",
      "name": "set page number for google search",
      "type": "n8n-nodes-base.code",
      "position": [
        2480,
        -180
      ]
    },
    {
      "id": "f76f28a5-8444-4ff9-b62c-0d94a07c6447",
      "name": "Extracts all linkedin urls from the google http response",
      "type": "n8n-nodes-base.code",
      "position": [
        3740,
        -280
      ]
    },
    {
      "id": "5a93c8f2-f55b-4d0e-92f8-0d86147f8d13",
      "name": "Google Boolean Search",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3500,
        -300
      ]
    },
    {
      "id": "37b4f264-34f0-47bb-9b1b-fa53beafb2a9",
      "name": "Generate a Boolean Search String",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1320,
        -180
      ]
    },
    {
      "id": "99041eff-f094-4c2a-a75a-4b01faf33d1b",
      "name": "If desired results not reached",
      "type": "n8n-nodes-base.if",
      "position": [
        2920,
        -200
      ]
    },
    {
      "id": "d218a1e8-2959-4b7c-a84d-f8e0df82c5e7",
      "name": "Appends the results to the sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        4040,
        -280
      ]
    },
    {
      "id": "7a56e7d7-31f8-4115-b993-227bd7221c07",
      "name": "Adds 10 to start - Go to next page",
      "type": "n8n-nodes-base.code",
      "position": [
        4340,
        -220
      ]
    },
    {
      "id": "afe22fc0-c9c1-4aab-a11d-d91740f812bb",
      "name": "Columns to add",
      "type": "n8n-nodes-base.code",
      "position": [
        1980,
        -180
      ]
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Google Boolean Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Columns to add": {
      "main": [
        [
          {
            "node": "Add columns to new sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a new sheet": {
      "main": [
        [
          {
            "node": "Columns to add",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Boolean Search": {
      "main": [
        [
          {
            "node": "Extracts all linkedin urls from the google http response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add columns to new sheet": {
      "main": [
        [
          {
            "node": "set page number for google search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Generate a Boolean Search String",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If desired results not reached": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Appends the results to the sheet": {
      "main": [
        [
          {
            "node": "Adds 10 to start - Go to next page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate a Boolean Search String": {
      "main": [
        [
          {
            "node": "Create a new sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set page number for google search": {
      "main": [
        [
          {
            "node": "If desired results not reached",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Adds 10 to start - Go to next page": {
      "main": [
        [
          {
            "node": "If desired results not reached",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extracts all linkedin urls from the google http response": {
      "main": [
        [
          {
            "node": "Appends the results to the sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}