AutomationFlowsSlack & Telegram › Automated Local Business Lead Generator with Ai, Social Media & Whatsapp Links

Automated Local Business Lead Generator with Ai, Social Media & Whatsapp Links

ByBudi SJ @budisj on n8n.io

This workflow automates the process of generating and managing local business leads by scraping Google Maps data, analyzing business information with AI, and creating personalized outreach messages. The system searches for local businesses based on keywords and locations,…

Cron / scheduled trigger★★★★☆ complexityAI-powered29 nodesHTTP RequestChain LlmGoogle SheetsTelegramOpenRouter Chat
Slack & Telegram Trigger: Cron / scheduled Nodes: 29 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #6925 — we link there as the canonical source.

This workflow follows the Chainllm → Google Sheets 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
{
  "id": "4Gt0UvB5ArkeE7Hi",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Local Business Lead Generator with AI, Social Media & WhatsApp Links",
  "tags": [],
  "nodes": [
    {
      "id": "e1e728f2-c48b-493b-8d73-0f72993083cd",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        420,
        0
      ],
      "parameters": {
        "url": "https://serpapi.com/search",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "api_key",
              "value": "YOUR_SERPAPI_KEY"
            },
            {
              "name": "engine",
              "value": "google_maps"
            },
            {
              "name": "type",
              "value": "search"
            },
            {
              "name": "google_domain",
              "value": "google.com"
            },
            {
              "name": "q",
              "value": "={{ $json.keyword }} {{ $json['city or specific location'] }}"
            },
            {
              "name": "gl",
              "value": "={{ $json['country code'] }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "efd6137c-6c9a-482c-92e4-e4691361be26",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1720,
        -100
      ],
      "parameters": {
        "text": "=Business Information:\n\nName: {{ $json.title }}\nAddress: {{ $json.address }}\nRating: {{ $json.rating }} (based on {{ $json.reviews }} reviews)\nTypes: {{ $json.types }}\nPhone: {{ $json.phone }}\nWebsite: {{ $json.website }}\nReviews Link: {{ $json.reviews_link }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=You are a digital business consultant. Based on the business information below, write a professional message directly addressed to the business owner.\nThe message should include:\n\nA brief summary of how the business is currently positioned (based on business type and typical customers)\nWhat customers likely appreciate most about the business\nAreas that could be improved for better visibility, engagement, or conversions\nOne actionable suggestion or opportunity for growth\nA short, persuasive closing line or CTA inviting them to improve their online presence or marketing strategy\nUse a helpful and respectful tone as if offering a free evaluation. Write in the language corresponding to the country code: {{ $('Get row(s) in sheet').item.json['country code'] }}."
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "933599b0-9cd8-4719-8c58-d3c6bae7c720",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        860,
        0
      ],
      "parameters": {
        "columns": {
          "value": {
            "phone": "={{ \"https://wa.me/\" + $json.phone.replace(/\\D/g, \"\") }}",
            "title": "={{ $json.title }}",
            "types": "={{ $json.types }}",
            "rating": "={{ $json.rating }}",
            "address": "={{ $json.address }}",
            "data_id": "={{ $json.data_id }}",
            "reviews": "={{ $json.reviews }}",
            "website": "={{ $json.website }}",
            "reviews_link": "={{ $json.reviews_link }}"
          },
          "schema": [
            {
              "id": "data_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "data_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "rating",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "reviews",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews_link",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "reviews_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "types",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "types",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "phone",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "review_summary",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "review_summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_1_status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_1_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "instagram",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "instagram",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tiktok",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "tiktok",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "web_summary",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "web_summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_2_status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_2_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "data_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1321933612,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=1321933612",
          "cachedResultName": "results"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Automated Local Business Lead Generator using AI, Gmail & Telegram"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "9eb71830-c068-4121-98fb-2fea45840451",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2540,
        160
      ],
      "parameters": {
        "text": "=----\n\nLatest Data for Follow Up\n\nBusiness Name: {{ $('Limit').item.json.title }}\nBusiness Types : {{ $('Limit').item.json.types }}\nLocation: {{ $('Limit').item.json.address }}\n\nWhatsapp Link: \n{{ $('Limit').item.json.phone }}\n\n----",
        "chatId": "YOUR_TELEGRAM_CHAT_ID",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "692059f0-ee24-409e-8f0c-1169404e4831",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        20,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "bfbc2bdb-f14a-4788-8775-2459caae979d",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        220,
        0
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "data"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Automated Local Business Lead Generator using AI, Gmail & Telegram"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "0ece857b-9e1e-4dc2-b368-71226683bd70",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1720,
        80
      ],
      "parameters": {
        "model": "google/gemini-2.0-flash-exp:free",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "71fea344-66b3-4042-aa2b-424b6d50bfb5",
      "name": "If has a web",
      "type": "n8n-nodes-base.if",
      "position": [
        2260,
        -100
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "6a19bdfe-33c6-4786-897a-1d292f647db6",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $('Limit').item.json.website }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0a4385ce-7460-43eb-99ba-2552e90f2b7f",
      "name": "Append or update row in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2960,
        -680
      ],
      "parameters": {
        "columns": {
          "value": {
            "tiktok": "={{ $json.tiktok }}",
            "data_id": "={{ $('Limit').item.json.data_id }}",
            "instagram": "={{ $json.instagram }}"
          },
          "schema": [
            {
              "id": "data_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "data_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "address",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "rating",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "reviews",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews_link",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "reviews_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "types",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "types",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "website",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "review_summary",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "review_summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_1_status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_1_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "instagram",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "instagram",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tiktok",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "tiktok",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "web_summary",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "web_summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_2_status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_2_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "data_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1321933612,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=1321933612",
          "cachedResultName": "results"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Automated Local Business Lead Generator using AI, Gmail & Telegram"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "ff892256-4826-4d6b-a467-c25ac1feed85",
      "name": "Basic LLM Chain1",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2960,
        -220
      ],
      "parameters": {
        "text": "=Business name: {{ $('Limit').item.json.title }}\nWebsite URL: {{ $('Limit').item.json.website }}\nWebsite content: {{ $('HTTP Request1').item.json.data }}\n",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=Please help create a professional message to the business owner based on the following website content. Focus on a brief analysis and improvement suggestions, and conclude with an invitation to discuss with our digital agency.\n\nFormat the message like this:\n---\n\nWe visited [business name]'s website and found that [...].\n[Paragraph 2: Suggested technical/UX/SEO improvements in a polite and professional manner.]\n[Paragraph 3: Suggestion from the agency, including name and CTA.]\n\nUse a polite, clear, and concise style. Use emoji to make more interactive. Write in country code {{ $('Get row(s) in sheet').item.json['country code'] }} language."
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "d721c358-0fa8-4b76-ad68-81871439f497",
      "name": "Append or update row in sheet2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3300,
        -220
      ],
      "parameters": {
        "columns": {
          "value": {
            "data_id": "={{ $('Limit').item.json.data_id }}",
            "web_summary": "={{ $json.text }}"
          },
          "schema": [
            {
              "id": "data_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "data_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "address",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "rating",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "reviews",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews_link",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "reviews_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "types",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "types",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "website",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "review_summary",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "review_summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_1_status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_1_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "instagram",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "instagram",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tiktok",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "tiktok",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "web_summary",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "web_summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_2_status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_2_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "data_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1321933612,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=1321933612",
          "cachedResultName": "results"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Automated Local Business Lead Generator using AI, Gmail & Telegram"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "da07d108-1e9a-4165-a00c-46a34ab0ef98",
      "name": "Send a text message1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3520,
        -220
      ],
      "parameters": {
        "text": "=----\n\nLatest Data for Follow Up\n\nBusiness Name: {{ $('Limit').item.json.title }}\nBusiness Types : {{ $('Limit').item.json.types }}\nLocation: {{ $('Limit').item.json.address }}\n\nWhatsapp Link: \n{{ $('Limit').item.json.phone }}\n\n----",
        "chatId": "=YOUR_TELEGRAM_CHAT_ID",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ed94c401-a892-44a4-ae30-7e15a23acfcc",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        640,
        0
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "local_results"
      },
      "executeOnce": true,
      "typeVersion": 1
    },
    {
      "id": "f9817682-0399-4635-82ba-9f9e9f8c1ddd",
      "name": "Get row(s) in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1080,
        0
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1321933612,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=1321933612",
          "cachedResultName": "results"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Automated Local Business Lead Generator using AI, Gmail & Telegram"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.6
    },
    {
      "id": "dcbf3521-62f1-4ece-b590-d018fa18fc56",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1300,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "febcf30b-1a4b-4ac3-971a-dcb5f471dee0",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.review_summary }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "373f6a6f-4bf1-4403-8ba2-01d7cd3bebd5",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        1520,
        -100
      ],
      "parameters": {
        "maxItems": 5
      },
      "typeVersion": 1
    },
    {
      "id": "e2a8be2e-1476-491c-97c2-48a80d65006c",
      "name": "Append or update row in sheet3",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2060,
        -100
      ],
      "parameters": {
        "columns": {
          "value": {
            "data_id": "={{ $('Limit').item.json.data_id }}",
            "review_summary": "={{ $json.text }}"
          },
          "schema": [
            {
              "id": "data_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "data_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "address",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "rating",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "reviews",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews_link",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "reviews_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "types",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "types",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "website",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "review_summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "review_summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_1_status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_1_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "instagram",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "instagram",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tiktok",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "tiktok",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "web_summary",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "web_summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "whatsapp_link_2_status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "whatsapp_link_2_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "data_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1321933612,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=1321933612",
          "cachedResultName": "results"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Automated Local Business Lead Generator using AI, Gmail & Telegram"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "65bea1ea-2295-4e6d-8c63-4fbde97d1d1e",
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2540,
        -220
      ],
      "parameters": {
        "url": "={{ $('Limit').item.json.website }}",
        "options": {}
      },
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "b9c345c3-f9ca-4620-85e5-fea50f92192e",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        2740,
        -680
      ],
      "parameters": {
        "jsCode": "const html = $json[\"data\"];\nconst ig = html.match(/https?:\\/\\/(www\\.)?instagram\\.com\\/[^\\s\"']+/i);\nconst tiktok = html.match(/https?:\\/\\/(www\\.)?tiktok\\.com\\/[^\\s\"']+/i);\n\nreturn [{\n  json: {\n    instagram: ig ? ig[0] : null,\n    tiktok: tiktok ? tiktok[0] : null\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "f2d95980-fb2c-4d47-ac8a-cbd7d81e09cb",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        2960,
        -40
      ],
      "parameters": {
        "model": "google/gemini-2.0-flash-exp:free",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "e540d2bc-d534-44ac-9367-7c3c847fdc86",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1520,
        280
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "27a67c3f-249b-44c5-b500-e77812bf3369",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        2740,
        -220
      ],
      "parameters": {
        "jsCode": "const html = $json[\"data\"] || \"\";\n\n// Fungsi bantu untuk ekstrak teks antar tag\nfunction extractTag(tag, html) {\n  const regex = new RegExp(`<${tag}[^>]*>(.*?)<\\\\/${tag}>`, 'gis');\n  const matches = [];\n  let match;\n  while ((match = regex.exec(html)) !== null) {\n    const clean = match[1].replace(/<[^>]*>/g, '').trim();\n    if (clean.length > 5) matches.push(clean);\n  }\n  return matches;\n}\n\n// Fungsi untuk ambil meta tag\nfunction extractMeta(name, html) {\n  const regex = new RegExp(`<meta[^>]+name=[\"']${name}[\"'][^>]+content=[\"']([^\"']+)[\"']`, 'i');\n  const match = regex.exec(html);\n  return match ? match[1].trim() : '';\n}\n\n// Ambil bagian penting\nconst title = extractTag('title', html)[0] || '';\nconst description = extractMeta('description', html);\nconst keywords = extractMeta('keywords', html);\nconst headings = extractTag('h1', html).concat(extractTag('h2', html), extractTag('h3', html), extractTag('h4', html));\nconst paragraphs = extractTag('p', html).filter(p => p.length > 30 && p.length < 300);\nconst buttons = extractTag('button', html).concat(extractTag('a', html)).filter(t => /order|buy|join|shop|sign|book|start|contact|subscribe/i.test(t));\n\n// Hasil akhir\nconst summary = [\n  `\ud83d\udd39 Title:\\n${title}`,\n  `\ud83d\udd39 Description:\\n${description}`,\n  `\ud83d\udd39 Keywords:\\n${keywords}`,\n  `\ud83d\udd39 Headings:\\n${headings.slice(0, 5).join('\\n') || '(Tidak ditemukan)'}`,\n  `\ud83d\udd39 Paragraf Penting:\\n${paragraphs.slice(0, 3).join('\\n\\n') || '(Tidak ditemukan)'}`,\n  `\ud83d\udd39 CTA / Tombol:\\n${buttons.slice(0, 5).join('\\n') || '(Tidak ditemukan)'}`\n].join('\\n\\n');\n\nreturn [{ json: { simplified_summary: summary } }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "f2af7012-3463-4e49-aa21-7c18625026c5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -600,
        -540
      ],
      "parameters": {
        "width": 540,
        "height": 1240,
        "content": "# Automated Local Business Lead Generator with AI, Social Media & WhatsApp Links\n\nThis workflow automates the process of generating and managing local business leads by scraping Google Maps data, analyzing business information with AI, and creating personalized outreach messages. The system searches for local businesses based on keywords and locations, extracts their contact information and reviews, then generates professional outreach messages tailored to each business. Results are stored in Google Sheets and notifications are sent via Telegram.\n\n\n\ud83d\udcca **Google Sheets Template**\nUse this template: [Local Business Lead Generator](https://docs.google.com/spreadsheets/d/1s1N_cAFoKtCsolQh4v3QZpqr8KmVzi7agKHr5MdBEBs/edit?usp=sharing)\n\n\n## \ud83d\udd11 Key Features\n- \ud83d\udd0d Searches Google Maps for local businesses using SerpAPI based on keywords and location parameters  \n- \ud83d\udccb Collects comprehensive business information including name, address, rating, reviews, phone numbers, and websites  \n- \ud83e\udd16 Uses OpenRouter's LLM to analyze business data and generate personalized outreach messages  \n- \ud83c\udf10 Analyzes business websites to provide targeted improvement suggestions  \n- \ud83d\udcf1 Automatically detects Instagram and TikTok profiles from business websites  \n- \ud83d\udde3\ufe0f Generates messages in the local language based on country code settings  \n- \ud83d\udcca Organizes and stores all collected data in Google Sheets with proper categorization  \n- \ud83d\ude80 Sends real-time updates and lead summaries via Telegram bot  \n- \ud83d\udcac Automatically creates WhatsApp links for easy business communication  \n\n---\n\n## \ud83d\udd27 Requirements\n- \u2705 **SerpAPI Account + API Key** \u2013 For Google Maps business data extraction  \n- \u2705 **OpenRouter Account + API Key** \u2013 For AI-powered message generation and analysis  \n- \u2705 **Telegram Bot + API Token** \u2013 For notifications and bot interactions  \n- \u2705 **Google Sheets** \u2013 Connected to n8n for data storage  \n- \u2705 **Google Sheets Template** \u2013 Pre-configured with proper column structure  \n\n---\n\n## \ud83c\udf81 Benefits\n- Fully automated lead generation and outreach system  \n- Saves time and increases efficiency for local business marketing  \n- High personalization improves engagement and response rate  \n- Scalable for any niche or location  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "ee7d5e30-8c35-4278-96f9-97a31a3b3204",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        -200
      ],
      "parameters": {
        "color": 2,
        "width": 580,
        "height": 380,
        "content": "- Run workflows automatically based on a specified schedule.\n- Fetch data from a Google Sheet containing a list of keywords and search locations.\n- Send requests to SerpAPI to retrieve business data from Google Maps based on input from the Sheet."
      },
      "typeVersion": 1
    },
    {
      "id": "cfacf4f1-b561-4e48-8306-63567d337f30",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        -200
      ],
      "parameters": {
        "color": 4,
        "width": 800,
        "height": 380,
        "content": "- Break the local results array from the SerpAPI JSON output into individual items for individual processing.\n- Save each business result to a Google Sheet (results tab), using the ID data as the matching column.\n- Retrieve data from the results sheet for further analysis or processing.\n- Filter unsummarized data for further processing."
      },
      "typeVersion": 1
    },
    {
      "id": "82526c8d-2ff1-42b9-9de7-b3c56d49d96e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1480,
        -340
      ],
      "parameters": {
        "color": 5,
        "width": 920,
        "height": 560,
        "content": "- Limit the number of items submitted to LLM for efficiency (e.g., only 5 businesses per batch)\n- Generate a review summary using a business information-based prompt.\n- The AI model used by the LLM Chain node above.\n- Save the review_summary results to Google Sheets (results tab), matching based on ID data.\n- Check if the business has a website for further processing."
      },
      "typeVersion": 1
    },
    {
      "id": "3ed718a5-eab3-4bee-a114-14248fcb3f99",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2720,
        -400
      ],
      "parameters": {
        "color": 6,
        "width": 500,
        "height": 500,
        "content": "- Fetch HTML content from a business website.\n- Extract important elements from the HTML using Regex, then organize them into a ready to use summary.\n- Provide an AI model for generating summaries."
      },
      "typeVersion": 1
    },
    {
      "id": "4a093569-46b8-4066-ba07-b751f2003419",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3260,
        -400
      ],
      "parameters": {
        "color": 7,
        "width": 500,
        "height": 500,
        "content": "- Save analysis results to Google Sheets.\n- Send automatic notifications to Telegram once data is processed and saved."
      },
      "typeVersion": 1
    },
    {
      "id": "b138f46b-a0bd-43e0-89b6-b51e76178082",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2720,
        -840
      ],
      "parameters": {
        "color": 7,
        "width": 500,
        "height": 400,
        "content": "- Find Instagram and TikTok account links from business website pages.\n- Save Instagram and TikTok extraction results to Google Sheets."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d17193ca-d795-492a-985a-4183538f81ab",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Append or update row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "Basic LLM Chain1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If has a web": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Append or update row in sheet3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain1": {
      "main": [
        [
          {
            "node": "Append or update row in sheet2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet1": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet2": {
      "main": [
        [
          {
            "node": "Send a text message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet3": {
      "main": [
        [
          {
            "node": "If has a web",
            "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

This workflow automates the process of generating and managing local business leads by scraping Google Maps data, analyzing business information with AI, and creating personalized outreach messages. The system searches for local businesses based on keywords and locations,…

Source: https://n8n.io/workflows/6925/ — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

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

Slack & Telegram

End-to-End Video Creation from user idea or transcript AI-Powered Scriptwriting using LLMs (e.g., DeepSeek via OpenRouter) Voiceover Generation with customizable TTS voices Image Scene Generation usin

HTTP Request, Form Trigger, Output Parser Structured +6
Slack & Telegram

Get notified when the International Space Station passes over your location - but only when you can actually see it! This workflow combines real-time ISS tracking with weather condition checks to send

HTTP Request, OpenAI Chat, Chain Llm +5
Slack & Telegram

This template is perfect for: AI art enthusiasts who want to stay updated on trending AI-generated artwork Content curators looking to automate art discovery Japanese-speaking users who want translate

@Apify/N8N Nodes Apify, Google Sheets, OpenAI Chat +6
Slack & Telegram

DailyQuote. Uses scheduleTrigger, httpRequest, telegram, chainLlm. Scheduled trigger; 17 nodes.

HTTP Request, Telegram, Chain Llm +3
Slack & Telegram

This n8n workflow, BlogBlitz, automates the creation and publishing of SEO-optimized blog posts for WordPress, saving you hours of content creation time. Triggered via Telegram or a scheduled interval

Chain Llm, Output Parser Structured, WordPress +7