{
  "name": "Google maps scrapper for LInkedin IDs",
  "nodes": [
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "0e817020-7faa-473e-b46e-321be56db7c3",
              "name": "Name",
              "value": "={{ $json.title }}",
              "type": "string"
            },
            {
              "id": "e93f137f-8464-4d40-97d3-0bb258a424d0",
              "name": "Category",
              "value": "={{ $json.categoryName }}",
              "type": "string"
            },
            {
              "id": "f4281d80-4900-4a2f-8ce6-295a4eed5cdb",
              "name": "Address",
              "value": "={{ $json.street }}",
              "type": "string"
            },
            {
              "id": "02d9b40b-d2fc-4d8c-87ba-863daf907907",
              "name": "city",
              "value": "={{ $json.city }}",
              "type": "string"
            },
            {
              "id": "4c9796f3-18b7-4bd1-ae2d-48c0be948d11",
              "name": "State",
              "value": "={{ $json.state }}",
              "type": "string"
            },
            {
              "id": "14f605e3-f9c7-4a95-acd7-621b98772a97",
              "name": "Website",
              "value": "={{ $json.website }}",
              "type": "string"
            },
            {
              "id": "2446362f-d2fa-4c97-bb5c-8c32fed265bc",
              "name": "Phone",
              "value": "={{ $json.phone }}",
              "type": "string"
            },
            {
              "id": "d4a6a2a2-1d62-4ef1-a545-46c7a0d5fe71",
              "name": "instagram",
              "value": "={{ $json.instagrams }}",
              "type": "string"
            },
            {
              "id": "fc73daaf-ec97-4eec-ba91-965dcf1aa38a",
              "name": "Facebook",
              "value": "={{ $json.facebooks }}",
              "type": "string"
            },
            {
              "id": "b5e40694-5596-487b-93f2-973dfbb75ec8",
              "name": "tiktok",
              "value": "={{ $json.tiktoks }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        272,
        -560
      ],
      "id": "8fcbc9cc-e64b-4fde-b486-6f11fe4ee6d5",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "formTitle": "Data Posts Scrapper",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Search Keyword",
              "placeholder": "EG: Hiring",
              "requiredField": true
            },
            {
              "fieldLabel": "Max Posts",
              "placeholder": "0",
              "requiredField": true
            },
            {
              "fieldLabel": "Location",
              "fieldType": "dropdown",
              "fieldOptions": {
                "values": [
                  {
                    "option": "New York, USA"
                  }
                ]
              },
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.3,
      "position": [
        -176,
        -560
      ],
      "id": "0715ee75-859b-42fe-a1e6-cd14d4a1a8ba",
      "name": "On form submission",
      "webhookId": "aef51f2b-59da-4f0c-a64c-938d9e013636"
    },
    {
      "parameters": {
        "operation": "Run actor and get dataset",
        "actorSource": "store",
        "actorId": {
          "__rl": true,
          "value": "nwua9Gu5YrADL7ZDj",
          "mode": "list",
          "cachedResultName": "Google Maps Scraper (compass/crawler-google-places)",
          "cachedResultUrl": "https://console.apify.com/actors/nwua9Gu5YrADL7ZDj/input"
        },
        "customBody": "={\n    \"includeWebResults\": false,\n    \"language\": \"en\",\n    \"locationQuery\": \"{{ $json.Location }}\",\n    \"maxCrawledPlacesPerSearch\": {{ $json['Max Posts'] }},\n    \"maximumLeadsEnrichmentRecords\": 0,\n    \"scrapeContacts\": true,\n    \"scrapeDirectories\": false,\n    \"scrapeImageAuthors\": false,\n    \"scrapePlaceDetailPage\": false,\n    \"scrapeReviewsPersonalData\": true,\n    \"scrapeSocialMediaProfiles\": {\n        \"facebooks\": true,\n        \"instagrams\": true,\n        \"tiktoks\": true,\n        \"twitters\": false,\n        \"youtubes\": false\n    },\n    \"scrapeTableReservationProvider\": false,\n    \"searchStringsArray\": [\n        \"{{ $json['Search Keyword'] }}\"\n    ],\n    \"skipClosedPlaces\": false,\n    \"verifyLeadsEnrichmentEmails\": false\n}"
      },
      "type": "@apify/n8n-nodes-apify.apify",
      "typeVersion": 1,
      "position": [
        48,
        -560
      ],
      "id": "cb5e46b7-6e4d-48dc-b3e8-d751cee06f75",
      "name": "Run an Actor and get dataset",
      "alwaysOutputData": false,
      "credentials": {
        "apifyApi": {
          "id": "MztYJlqySvkrS3pz",
          "name": "Apify account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        496,
        -560
      ],
      "id": "d60bc9a7-245e-4a6f-b1bf-b8fae24511bf",
      "name": "Loop Over Items1"
    },
    {
      "parameters": {
        "url": "https://serpapi.com/search",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "engine",
              "value": "google"
            },
            {
              "name": "q",
              "value": "={{ $json['search query'] }}"
            },
            {
              "name": "location",
              "value": "={{ $('Loop Over Items1').item.json.State }}"
            },
            {
              "name": "google_domain",
              "value": "google.com"
            },
            {
              "name": "hl",
              "value": "en"
            },
            {
              "name": "gl",
              "value": "us"
            },
            {
              "name": "api_key"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        944,
        -800
      ],
      "id": "7358d8fc-2f94-4a5f-8bbd-97c02882b86a",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "e47bdc1e-8a7e-43b1-acbd-900458ea99ed",
              "leftValue": "={{ $json.linkedin }}",
              "rightValue": "linkedin.com/in",
              "operator": {
                "type": "string",
                "operation": "contains"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1392,
        -800
      ],
      "id": "68892f42-4053-4233-a798-ec46dc5661aa",
      "name": "If"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "600b0612-fce7-4eb4-9d4c-4dacd3c3f401",
              "name": "search query",
              "value": "=who is the owner of this {{ $json.Name }} and his linkedin account",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        720,
        -800
      ],
      "id": "869b1c9b-9d09-4eae-89f7-4e7f59d8c65b",
      "name": "Edit Fields1"
    },
    {
      "parameters": {
        "operation": "sendAndWait",
        "sendTo": "example@domain.com",
        "subject": "=LInkedin Account not Found {{ $json.related_questions[0].title }}",
        "message": "=Hi,\nThis leads does not contain linkedin Account here are the details\n{{ $json.search_metadata.google_url }}\n{{ $('Edit Fields').item.json.Website }}\n{{ $('Edit Fields').item.json.Phone }}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1696,
        -544
      ],
      "id": "2ed70474-05fa-4fe1-acd1-7f4177d373e2",
      "name": "Send message and wait for response",
      "webhookId": "081ebe9f-9bb2-4ed5-8313-d167b255d87a",
      "credentials": {
        "gmailOAuth2": {
          "id": "usnG13bfHBLSazAv",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1jqPCVBRvQHi3Vqffw3rhmKAERtTxyFdV4mEXvEdrRR4",
          "mode": "list",
          "cachedResultName": "Google maps scrape & Linkedin account",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jqPCVBRvQHi3Vqffw3rhmKAERtTxyFdV4mEXvEdrRR4/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jqPCVBRvQHi3Vqffw3rhmKAERtTxyFdV4mEXvEdrRR4/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "name": "={{ $('Edit Fields').item.json.Name }}",
            "category": "={{ $('Edit Fields').item.json.Category }}",
            "address": "={{ $('Edit Fields').item.json.Address }}",
            "city": "={{ $('Edit Fields').item.json.city }}",
            "state": "={{ $('Edit Fields').item.json.State }}",
            "website": "={{ $('Edit Fields').item.json.Website }}",
            "business phone": "={{ $('Edit Fields').item.json.Phone }}",
            "instagram": "={{ $('Edit Fields').item.json.instagram }}",
            "facebook": "={{ $('Edit Fields').item.json.Facebook }}",
            "tiktok": "={{ $('Edit Fields').item.json.tiktok }}",
            "owner name": "={{ $json.ownerName }}",
            "Owner Linkedin": "={{ $json.linkedinurl }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "address",
              "displayName": "address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "city",
              "displayName": "city",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "state",
              "displayName": "state",
              "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": "business phone",
              "displayName": "business phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "instagram",
              "displayName": "instagram",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "facebook",
              "displayName": "facebook",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "tiktok",
              "displayName": "tiktok",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "owner name",
              "displayName": "owner name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Owner Linkedin",
              "displayName": "Owner Linkedin",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1872,
        -784
      ],
      "id": "e8603447-2358-49e0-942a-3b74ed38c353",
      "name": "Append row in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "Kt9LvpLiUcSpbLvt",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "68b7707b-c979-46e7-9c24-bd83d4387604",
              "name": "ownerName",
              "value": "={{ $('HTTP Request').item.json.organic_results[0].title }}",
              "type": "string"
            },
            {
              "id": "2f0cc071-3f06-4fa0-94c8-87c2ba3133e2",
              "name": "linkedinurl",
              "value": "={{ $json.linkedin }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1616,
        -896
      ],
      "id": "9e0481c9-930f-4d83-ae65-f3a3d8eefa46",
      "name": "Edit Fields2"
    },
    {
      "parameters": {
        "jsCode": "const data = $('HTTP Request').item.json;\n\nlet links = [];\n\n// related_questions se links\nif (data.related_questions) {\n  data.related_questions.forEach(q => {\n    if (q.link) links.push(q.link);\n  });\n}\n\n// organic_results se links\nif (data.organic_results) {\n  data.organic_results.forEach(r => {\n    if (r.link) links.push(r.link);\n  });\n}\n\n// 🔥 sirf LinkedIn profiles filter karo\nlinks = links.filter(link => link.includes(\"linkedin.com/in\"));\n\n// duplicates remove\nlinks = [...new Set(links)];\n\nreturn links.map(link => ({\n  json: {\n    linkedin: link\n  }\n}));"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1168,
        -800
      ],
      "id": "c7ad0902-b95c-492b-83c7-493c4f47cf9a",
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "content": "Google maps scrapper for LInkedin IDs",
        "height": 928,
        "width": 2640,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        -1072
      ],
      "typeVersion": 1,
      "id": "610e793c-885c-4acc-8adc-d66b2cb1171e",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": " Welcome to the Google Maps → LinkedIn ID Scraper\n\nThank you for using this workflow!\n\nThis template helps you discover businesses from Google Maps and automatically find their LinkedIn profiles/IDs, making lead generation and outreach much faster.\n\nNeed Help?\n\nIf you need:\n\nWorkflow setup assistance\nAPI configuration help\nCustom modifications\nAI Automation solutions\nn8n, Make.com, or Agentic AI development\n\nFeel free to contact me.\n\n🌐 Website: https://fearlessdigital.org/join/\n\n📺 YouTube: https://www.youtube.com/@aiwithdaniyal3\n\n📸 Instagram: https://www.instagram.com/faazfearlessofficial\n\nAbout the Creator\n\nDaniyal Zia\nFounder of Fearless Digital",
        "height": 816,
        "width": 480,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        -1072
      ],
      "typeVersion": 1,
      "id": "e7531f58-0ce5-4c95-92a7-25f406eebec7",
      "name": "Sticky Note1"
    }
  ],
  "pinData": {},
  "connections": {
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Run an Actor and get dataset",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run an Actor and get dataset": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [],
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send message and wait for response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send message and wait for response": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d6ad42d1-87f3-4ec5-b85f-debfcb117b55",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "c62875307c54e9fc51e3b84d0d5ae08e850cadc663fee5b9c828cc4be00b181f"
  },
  "id": "mEkrAq7c7lDPb5S4",
  "tags": [
    {
      "createdAt": "2026-04-24T10:22:55.292Z",
      "updatedAt": "2026-04-24T10:22:55.292Z",
      "id": "lZ4xSEoKtZkgDU4B",
      "name": "google"
    }
  ]
}