{
  "name": "Linkedin Lead Scraper with Apify",
  "nodes": [
    {
      "parameters": {
        "amount": 20,
        "unit": "seconds"
      },
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        0,
        -300
      ],
      "id": "22d28736-4f7a-4fb5-a633-f004f57eaf8f",
      "webhookId": "c9dfdbd0-9e6c-48b8-a4bd-357912d565f2"
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1s9oaGi7gj0Wk1NdP0ywxxSx64fab4bq0toYMpZiMT24",
          "mode": "list",
          "cachedResultName": "apify demo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1s9oaGi7gj0Wk1NdP0ywxxSx64fab4bq0toYMpZiMT24/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 196630155,
          "mode": "list",
          "cachedResultName": "linkedin",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1s9oaGi7gj0Wk1NdP0ywxxSx64fab4bq0toYMpZiMT24/edit#gid=196630155"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "LinkedInURL": "={{ $json.linkedinUrl }}",
            "firstName": "={{ $json.firstName }}",
            "lastName": "={{ $json.lastName }}",
            "headline": "={{ $json.headline }}",
            "jobTitle": "={{ $json.jobTitle }}",
            "Company": "={{ $json.companyName }}",
            "Industry": "={{ $json.companyIndustry }}",
            "Website": "={{ $json.companyWebsite }}",
            "Company Size": "={{ $json.companySize }}",
            "Country": "={{ $json.addressCountryOnly }}"
          },
          "matchingColumns": [
            "LinkedInURL"
          ],
          "schema": [
            {
              "id": "LinkedInURL",
              "displayName": "LinkedInURL",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "firstName",
              "displayName": "firstName",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "lastName",
              "displayName": "lastName",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "headline",
              "displayName": "headline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "jobTitle",
              "displayName": "jobTitle",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "displayName": "Industry",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "displayName": "Website",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Size",
              "displayName": "Company Size",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -100,
        -60
      ],
      "id": "008a6150-a4d1-4477-9417-f3a4888fecef",
      "name": "Upsert Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "ESD8JJHqd8A9NlNx",
          "name": "Google Sheets account (Kris)"
        }
      }
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -340,
        -300
      ],
      "id": "b3e130c9-6721-44b9-80f1-ebed7d564778",
      "name": "When clicking ‘Test workflow’"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apify.com/v2/acts/dev_fusion~linkedin-profile-scraper/runs",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"profileUrls\": [\n    \"https://www.linkedin.com/in/rbranson\",\n    \"https://www.linkedin.com/in/williamhgates\",\n    \"http://www.linkedin.com/in/jeannie-wyrick-b4760710a\",\n    \"https://www.linkedin.com/in/jeffweiner08\",\n    \"https://www.linkedin.com/in/reidhoffman\",\n    \"https://www.linkedin.com/in/ryanroslansky\",\n    \"https://www.linkedin.com/in/mrogati\",\n    \"https://www.linkedin.com/in/naomisimson\",\n    \"https://www.linkedin.com/in/sundarpichai\",\n    \"https://www.linkedin.com/in/satyanadella\",\n    \"https://www.linkedin.com/in/sherylsandberg\"\n  ]\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -160,
        -300
      ],
      "id": "9d213544-7319-4cd2-b91c-0a6499929492",
      "name": "Scrape Linkedin Profiles (APIFY)",
      "credentials": {
        "httpBasicAuth": {
          "id": "O0OOt4m5Ck2YFP46",
          "name": "Apify API"
        },
        "httpHeaderAuth": {
          "id": "nCVw9Gdz7a5BEsks",
          "name": "APIFY Token"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ \"https://api.apify.com/v2/datasets/\" + $json.data.defaultDatasetId + \"/items\" }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -280,
        -60
      ],
      "id": "d293b89d-f2a9-424e-8f31-8d6042f3db5d",
      "name": "Get Enriched Data",
      "credentials": {
        "httpHeaderAuth": {
          "id": "nCVw9Gdz7a5BEsks",
          "name": "APIFY Token"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Get Enriched Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Scrape Linkedin Profiles (APIFY)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Linkedin Profiles (APIFY)": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Enriched Data": {
      "main": [
        [
          {
            "node": "Upsert Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5d0b4046-f033-45a5-9637-93465758c10c",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "4aabc0aa2e160dafa4f9d9bcedde563b5af29598cd16960f637ae2fb99aea720"
  },
  "id": "DozRyNaDKyQLZXiB",
  "tags": []
}