AutomationFlowsWeb Scraping › Google Maps Lead Gen - Apify to Gsheet

Google Maps Lead Gen - Apify to Gsheet

Google Maps Lead Gen - Apify to GSheet. Uses httpRequest, googleSheets, telegram. Event-driven trigger; 8 nodes.

Event trigger★★★★☆ complexity8 nodesHTTP RequestGoogle SheetsTelegram
Web Scraping Trigger: Event Nodes: 8 Complexity: ★★★★☆ Added:

This workflow follows the Google Sheets → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Google Maps Lead Gen - Apify to GSheet",
  "nodes": [
    {
      "parameters": {},
      "id": "start",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "apifyToken",
              "value": "YOUR_APIFY_TOKEN_HERE"
            },
            {
              "name": "actorId",
              "value": "compass/crawler-google-places"
            },
            {
              "name": "keywords",
              "value": "spa Ho Chi Minh City, gym Hanoi, cafe Da Nang"
            },
            {
              "name": "maxPlaces",
              "value": "50"
            }
          ]
        }
      },
      "id": "config",
      "name": "Config",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://api.apify.com/v2/acts/{{$node.Config.json.actorId}}/runs?token={{$node.Config.json.apifyToken}}",
        "options": {},
        "bodyParametersJson": "={\n  \"startUrls\": [\n    {{ $node.Config.json.keywords.split(',').map(k => `{\"url\": \"https://www.google.com/maps/search/${k.trim().replace(/ /g, '+')}\"}` ).join(',') }}\n  ],\n  \"maxCrawledPlaces\": {{$node.Config.json.maxPlaces}}\n}"
      },
      "id": "apify-run",
      "name": "Apify - Start Actor",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "amount": 30
      },
      "id": "wait",
      "name": "Wait 30s",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "=https://api.apify.com/v2/acts/{{$node.Config.json.actorId}}/runs/{{$node[\"Apify - Start Actor\"].json.data.id}}/dataset/items?token={{$node.Config.json.apifyToken}}"
      },
      "id": "apify-get",
      "name": "Apify - Get Dataset",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        1120,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\nconst qualified = [];\n\nfor (const item of items) {\n  const data = item.json;\n  \n  let score = 0;\n  const country = data.countryCode || '';\n  const rating = parseFloat(data.totalScore || 0);\n  const reviews = parseInt(data.reviewsCount || 0);\n  const phone = data.phone || '';\n  const website = data.website || '';\n  const category = (data.categoryName || '').toLowerCase();\n  const city = (data.city || '').toLowerCase();\n  \n  if (country !== 'VN') continue;\n  if (rating < 4.0) continue;\n  if (reviews < 10) continue;\n  if (!phone && !website) continue;\n  \n  if (rating >= 4.5) score += 20;\n  if (reviews >= 50) score += 15;\n  if (website) score += 10;\n  \n  const priorityCategories = ['spa', 'gym', 'cafe', 'restaurant', 'beauty', 'salon', 'marketing', 'software'];\n  if (priorityCategories.some(cat => category.includes(cat))) score += 10;\n  \n  const priorityCities = ['ho chi minh', 'hanoi', 'da nang', 'hai phong', 'can tho'];\n  if (priorityCities.some(c => city.includes(c))) score += 10;\n  \n  if (score >= 50) {\n    qualified.push({\n      json: {\n        name: data.title,\n        address: data.address,\n        city: data.city,\n        phone: phone,\n        website: website,\n        rating: rating,\n        reviews: reviews,\n        category: data.categoryName,\n        score: score,\n        mapsUrl: data.url,\n        scrapedAt: new Date().toISOString()\n      }\n    });\n  }\n}\n\nreturn qualified;"
      },
      "id": "filter-score",
      "name": "Filter & Score",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        1340,
        300
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": "YOUR_GOOGLE_SHEET_ID",
        "sheetName": "Leads",
        "columns": {
          "mappingMode": "autoMapInputData"
        }
      },
      "id": "gsheet",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 3,
      "position": [
        1560,
        300
      ]
    },
    {
      "parameters": {
        "chatId": "YOUR_TELEGRAM_CHAT_ID",
        "text": "=\ud83c\udfaf New Leads: {{$node[\"Filter & Score\"].json.length}} qualified leads\n\nTop 3:\n{{$node[\"Filter & Score\"].json.slice(0,3).map(l => `\u2022 ${l.name} (Score: ${l.score}) - ${l.city}`).join('\\n')}}"
      },
      "id": "telegram",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [
        1560,
        480
      ]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config": {
      "main": [
        [
          {
            "node": "Apify - Start Actor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apify - Start Actor": {
      "main": [
        [
          {
            "node": "Wait 30s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 30s": {
      "main": [
        [
          {
            "node": "Apify - Get Dataset",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apify - Get Dataset": {
      "main": [
        [
          {
            "node": "Filter & Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter & Score": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          },
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Google Maps Lead Gen - Apify to GSheet. Uses httpRequest, googleSheets, telegram. Event-driven trigger; 8 nodes.

Source: https://gist.github.com/victorChuyen/36fcee721d01dc6b36e6e64678af8481 — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

A customized n8n workflow inspired by the Lead Generation Agent template. It automates B2B lead scraping via Apify, extracts contact emails with AI, sends cold emails via Gmail, and logs every interac

Telegram, Google Sheets, Gmail +4
Web Scraping

This powerful workflow automates the evaluation of new digital tools, websites, or platforms with the goal of assessing their potential impact on your business. By leveraging Telegram for user input,

Telegram Trigger, OpenRouter Chat, Telegram +6
Web Scraping

This workflow is designed for entrepreneurs, sales teams, marketers, and agencies who want to automate lead discovery and build qualified business contact lists — without manual searching or copying d

@Apify/N8N Nodes Apify, Google Sheets, Telegram Trigger +3
Web Scraping

Automate LinkedIn lead generation by scraping comments from targeted posts and enriching profiles with detailed data

Form Trigger, HTTP Request, Google Sheets
Web Scraping

This automated n8n workflow scrapes job listings from Upwork using Apify, processes and cleans the data, and generates daily email reports with job summaries. The system uses Google Sheets for data st

Google Sheets, HTTP Request, Gmail