{
  "id": "Eo2mqDdtIQFdZhxp",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "LinkedIn Job Finder Automation using Bright Data API & Google Sheets Integration",
  "tags": [],
  "nodes": [
    {
      "id": "9617d433-62f7-4ddf-bf47-a9a3208aa248",
      "name": "On form submission1",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -660,
        -460
      ],
      "parameters": {
        "options": {},
        "formTitle": "LinkedIn Job Finder",
        "formFields": {
          "values": [
            {
              "fieldLabel": "City",
              "requiredField": true
            },
            {
              "fieldLabel": "Job Title",
              "requiredField": true
            },
            {
              "fieldLabel": "Country",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Job_type(Optional)",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Full-Time"
                  },
                  {
                    "option": "Part-Time"
                  },
                  {
                    "option": "Remote"
                  },
                  {
                    "option": "WFH"
                  },
                  {
                    "option": "Contract"
                  },
                  {
                    "option": "Internship"
                  },
                  {
                    "option": "Freelance"
                  }
                ]
              }
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "47c35950-354c-42e4-b707-60ed5b1eeb2f",
      "name": "Check Final Status",
      "type": "n8n-nodes-base.if",
      "position": [
        320,
        -460
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "35ed620d-b5d5-4e97-bcc5-52b283d85616",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "ready"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "cef9c86d-98ce-4944-9907-d815cba406f4",
      "name": "Create Snapshot ID",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -360,
        -460
      ],
      "parameters": {
        "url": "https://api.brightdata.com/datasets/v3/trigger",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"input\": [\n    {\n      \"location\": \"{{$node['On form submission1'].json['City'] ? $node['On form submission1'].json['City'].trim() : ''}}\",\n      \"keyword\": \"{{$node['On form submission1'].json['Job Title'] ? $node['On form submission1'].json['Job Title'].trim() : ''}}\",\n      \"country\": \"{{$node['On form submission1'].json['Country'] ? $node['On form submission1'].json['Country'].slice(0, 2).toUpperCase() : ''}}\",\n      \"time_range\": \"Past week\",\n      \"job_type\": \"{{ ['full-time', 'part-time', 'internship', 'contract', 'temporary'].includes($node['On form submission1'].json['Job_type']?.toLowerCase()) ? $node['On form submission1'].json['Job_type'] : '' }}\"\n    }\n  ],\n  \"custom_output_fields\": [\n    \"url\",\n    \"job_posting_id\",\n    \"job_title\",\n    \"company_name\",\n    \"company_id\",\n    \"job_location\",\n    \"job_summary\",\n    \"job_seniority_level\",\n    \"job_function\",\n    \"job_employment_type\",\n    \"job_industries\",\n    \"job_base_pay_range\",\n    \"company_url\",\n    \"job_posted_time\",\n    \"job_num_applicants\",\n    \"discovery_input\",\n    \"apply_link\",\n    \"country_code\",\n    \"title_id\",\n    \"company_logo\",\n    \"job_posted_date\",\n    \"job_poster\",\n    \"application_availability\",\n    \"job_description_formatted\",\n    \"base_salary\",\n    \"timestamp\",\n    \"error\",\n    \"error_code\",\n    \"warning\",\n    \"warning_code\"\n  ]\n}\n",
        "sendBody": true,
        "sendQuery": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "queryParameters": {
          "parameters": [
            {
              "name": "dataset_id",
              "value": "YOUR_DATASET_ID_HERE"
            },
            {
              "name": "include_errors",
              "value": "true"
            },
            {
              "name": "type",
              "value": "discover_new"
            },
            {
              "name": "discover_by",
              "value": "keyword"
            },
            {
              "name": "limit_per_input",
              "value": "2"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "66705bee-6424-4f6f-8c24-d9aa7a198399",
      "name": "Check Snapshot Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        20,
        -460
      ],
      "parameters": {
        "url": "=https://api.brightdata.com/datasets/v3/progress/{{ $json.snapshot_id }}",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "format",
              "value": "json"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "b5f9e1c9-eace-4a68-a084-dc254b1b9c46",
      "name": "Wait 1 minute",
      "type": "n8n-nodes-base.wait",
      "position": [
        620,
        -100
      ],
      "parameters": {
        "unit": "minutes",
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "fff887f5-0388-4667-a5e9-7ef72ea36ac0",
      "name": "Scrape Data from SnapID",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        900,
        -500
      ],
      "parameters": {
        "url": "=https://api.brightdata.com/datasets/v3/snapshot/{{ $json.snapshot_id }}",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "format",
              "value": "json"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "57572d1d-3366-447d-8186-62a121824033",
      "name": "Update Job Lists in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1380,
        -500
      ],
      "parameters": {
        "columns": {
          "value": {
            "Location": "={{ $json.job_location }}",
            "Job Title": "={{ $json.job_title }}",
            "Apply Link": "={{ $json.apply_link }}",
            "Job Detail": "={{ $json.job_summary }}",
            "Company URL": "={{ $json.company_url }}",
            "Company Name ": "={{ $json.company_name }}"
          },
          "schema": [
            {
              "id": "Company URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Job Title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Job Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Name ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company Name ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Job Detail",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Job Detail",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Apply Link",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Apply Link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID_HERE/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID_HERE",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID_HERE/edit?usp=drivesdk",
          "cachedResultName": "LinkedIn"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "3afbef52-97fe-4ead-8d57-d8e98e684b47",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        1140,
        -500
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "eb682420-fc89-4e01-a491-5a4a3f6bf10f",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.job_summary }}",
              "rightValue": "={{ $json.shortCommonName }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1badd4f4-4f66-4777-a2b7-3343f2afb2b3",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        620,
        -480
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f01bd215-c406-493c-a6e4-2b8ec5686b44",
              "operator": {
                "type": "number",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.records }}",
              "rightValue": "={{ 0 }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "df16ac92-0f96-40cd-ad9c-da17332a3e81",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -620
      ],
      "parameters": {
        "color": 2,
        "width": 300,
        "height": 340,
        "content": "\ud83d\udd39 Search by Keyword \u2014 Form Trigger\nPurpose:\nCollects the user-submitted job search criteria including city, job title, country, and job type.\nTriggers the workflow when new search parameters are entered."
      },
      "typeVersion": 1
    },
    {
      "id": "454c5db0-beb7-4a0b-95ca-8308a114e420",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        -660
      ],
      "parameters": {
        "color": 3,
        "width": 320,
        "height": 380,
        "content": "\ud83d\udd39 LinkedIn Job Search Fetcher \u2014 HTTP Request (POST to Bright Data)\nPurpose:\nSends the job search criteria to Bright Data's LinkedIn dataset API.\nInitiates the scraping job to fetch LinkedIn job postings matching the criteria."
      },
      "typeVersion": 1
    },
    {
      "id": "c68c4da8-6965-45cb-833f-0bb3a99a289c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        -640
      ],
      "parameters": {
        "color": 4,
        "width": 300,
        "height": 360,
        "content": "\ud83d\udd39 Check Delivery Status of Snap ID \u2014 HTTP Request (GET)\nPurpose:\nChecks the status of the scraping job using the returned snapshot_id.\nEnsures the task is complete before continuing to data extraction."
      },
      "typeVersion": 1
    },
    {
      "id": "57d2b098-41ce-4ee6-ab1d-130e2645dc3e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        -220
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 280,
        "content": "\ud83d\udd39 Wait 1 minute \u2014 Wait Node\nPurpose:\nDelays the workflow execution by 1 minute.\nPrevents frequent polling of Bright Data API to reduce load and errors."
      },
      "typeVersion": 1
    },
    {
      "id": "47fc7436-1f6b-4bec-b88c-4df12ceddf57",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -640
      ],
      "parameters": {
        "color": 5,
        "width": 270,
        "height": 360,
        "content": "\ud83d\udd39 Check Final Status \u2014 IF Node #1\nPurpose:\nConditionally checks if snapshot status is \"ready\".\nIf yes \u2192 proceed to download scraped data.\nIf no \u2192 loop back to Wait Node and recheck."
      },
      "typeVersion": 1
    },
    {
      "id": "7a978cd2-efad-474d-92b7-3f9f28155f00",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -680
      ],
      "parameters": {
        "color": 6,
        "width": 260,
        "height": 400,
        "content": "\ud83d\udd39 Decode Snapshot from Response \u2014 HTTP Request (GET)\nPurpose:\nDownloads the final scraped LinkedIn job dataset using the ready snapshot ID.\nContains full job posting data in JSON format."
      },
      "typeVersion": 1
    },
    {
      "id": "6ff9b0c5-b18c-44e9-b671-86388428927b",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        -660
      ],
      "parameters": {
        "color": 3,
        "width": 340,
        "height": 400,
        "content": "\ud83d\udd39 Google Sheets \u2014 Google Sheets (AppendOrUpdate)\nPurpose:\nAppends each LinkedIn job result into your Google Sheet.\nCaptures data fields like job title, company name, location, job details, and apply links."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "57896d29-3f06-44b6-bb08-964875ffc7fb",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Scrape Data from SnapID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Update Job Lists in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 1 minute": {
      "main": [
        [
          {
            "node": "Check Snapshot Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Final Status": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 1 minute",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Snapshot ID": {
      "main": [
        [
          {
            "node": "Check Snapshot Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission1": {
      "main": [
        [
          {
            "node": "Create Snapshot ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Snapshot Status": {
      "main": [
        [
          {
            "node": "Check Final Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Data from SnapID": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}