8
n8n 中文网amn8n.com

从Google地图列表提取商业邮箱用于潜在客户生成

高级

这是一个Lead Generation领域的自动化工作流,包含 20 个节点。主要使用 Code, Wait, Limit, Filter, SplitOut 等节点。 从Google地图列表提取商业邮箱用于潜在客户生成

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "5935d23fce125caa8ab93af824f47776e317d824634bf7b68a810b49a4038f0a"
  },
  "nodes": [
    {
      "id": "f892006c-8856-4a24-8ad5-71fb19c57011",
      "name": "当点击\"测试工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "notes": "Entry point — manually start the workflow via the Test button.",
      "position": [
        -2400,
        384
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "202d221b-a899-455b-884f-1661496a9866",
      "name": "抓取Google Maps",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Fetches the Google Maps search results page for 'calgary dentists'.",
      "position": [
        -2176,
        384
      ],
      "parameters": {
        "url": "https://www.google.com/maps/search/carpinteros+en+tarragona/@41.1402229,1.0832014,56063m/data=!3m1!1e3?entry=ttu&g_ep=EgoyMDI1MTAwMS4wIKXMDSoASAFQAw%3D%3D",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          },
          "allowUnauthorizedCerts": true
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "50bc0bec-b364-41cb-84bd-9c26f1b92b86",
      "name": "提取URL",
      "type": "n8n-nodes-base.code",
      "notes": "Extracts all URLs from the HTML response and returns one item per URL.",
      "position": [
        -1952,
        384
      ],
      "parameters": {
        "jsCode": "const input = $input.first().json.data\nconst regex = /https?:\\/\\/[^\\/\\s\"'>]+/g\nconst websites = input?.match?.(regex) || []\nreturn websites.map(website => ({ json: { website } }))"
      },
      "typeVersion": 2
    },
    {
      "id": "65bbd225-9663-4853-82be-18ec96cd52b8",
      "name": "过滤Google URL",
      "type": "n8n-nodes-base.filter",
      "notes": "Removes unwanted Google-related or tracking URLs.",
      "position": [
        -1728,
        384
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "bf0a5053-9660-457c-9581-964793bb6d7d",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.website }}",
              "rightValue": "schema"
            },
            {
              "id": "9110b9e0-12aa-45cc-bde0-9eda8c10970e",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.website }}",
              "rightValue": "google"
            },
            {
              "id": "fb9b6ed6-96a5-4560-ab10-b8a4b9a61a2b",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.website }}",
              "rightValue": "gg"
            },
            {
              "id": "10500c0b-cdbd-4816-aba3-df60d69845dc",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.website }}",
              "rightValue": "gstatic"
            },
            {
              "id": "c0f78219-b32c-4483-8596-22628a28acf7",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.website }}",
              "rightValue": "sentry.wixpress.com"
            },
            {
              "id": "d162a4cf-02f3-492e-adb7-333bf6cd152b",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.website }}",
              "rightValue": "sentry.io"
            },
            {
              "id": "1e88aa52-44e3-459e-bcec-e18bd3de3d2a",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.website }}",
              "rightValue": "sentry-next.wixpress.com"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a6c87588-44f9-44f3-8b61-95e27d1e4442",
      "name": "去重",
      "type": "n8n-nodes-base.removeDuplicates",
      "notes": "Removes duplicate website URLs.",
      "position": [
        -1504,
        384
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "902fc9fa-4908-460a-b3d5-e8396917b2fc",
      "name": "限制",
      "type": "n8n-nodes-base.limit",
      "notes": "Limits the number of websites processed per run to 10.",
      "position": [
        -1280,
        384
      ],
      "parameters": {
        "maxItems": 100
      },
      "typeVersion": 1
    },
    {
      "id": "5b49547e-f87b-4e7f-97f8-ba4e4976fb90",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "notes": "Processes websites one at a time (batch processing).",
      "position": [
        -1056,
        384
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "86312345-b2e2-46cf-80bc-4836f58b9e44",
      "name": "等待1",
      "type": "n8n-nodes-base.wait",
      "notes": "Adds a delay between requests to avoid server blocking.",
      "position": [
        -832,
        192
      ],
      "webhookId": "0fe34756-6e43-4603-8891-5747a9a6500a",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "eae01ed2-f39b-443f-91a5-39a6e8d98b91",
      "name": "抓取网站",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Fetches the website HTML (does not follow redirects).",
      "onError": "continueRegularOutput",
      "position": [
        -832,
        384
      ],
      "parameters": {
        "url": "={{ $json.website }}",
        "options": {
          "redirect": {
            "redirect": {
              "followRedirects": false
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "b7f7a122-c882-4a58-9a80-9c94ad58b600",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "notes": "Short wait before parsing to prevent hitting rate limits.",
      "position": [
        -608,
        384
      ],
      "webhookId": "19cc6ed4-4fe7-485b-b879-c679e4b3374d",
      "parameters": {
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "dbe428f8-7a47-4438-a869-9813db4d1a4e",
      "name": "提取邮箱",
      "type": "n8n-nodes-base.code",
      "notes": "Extracts email addresses from the website HTML.",
      "onError": "continueRegularOutput",
      "position": [
        -384,
        464
      ],
      "parameters": {
        "jsCode": "const input = $input.first().json.data\nconst regex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.(?!jpeg|jpg|png|gif|webp|svg)[a-zA-Z]{2,}/g\nconst emails = input?.match?.(regex) || []\nreturn { json: { emails } }"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "c25386cf-cfd0-4546-ae30-d79c628b0415",
      "name": "过滤空值",
      "type": "n8n-nodes-base.filter",
      "notes": "Passes through only items where 'emails' exists and is not empty.",
      "position": [
        -608,
        192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a6786c58-424a-409a-b87f-8a7592cb7944",
              "operator": {
                "type": "array",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.emails }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6367d624-1559-40ee-8f90-9293c0ce8847",
      "name": "拆分输出",
      "type": "n8n-nodes-base.splitOut",
      "notes": "Splits multiple emails into separate items (one per row).",
      "position": [
        -384,
        192
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "emails"
      },
      "typeVersion": 1
    },
    {
      "id": "5b81ce13-0e56-4aac-aaa3-91be7d9103aa",
      "name": "去重(2)",
      "type": "n8n-nodes-base.removeDuplicates",
      "notes": "Removes duplicate emails before saving.",
      "position": [
        -160,
        192
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "7fd76480-d159-4566-9f2c-12ee0e5797c2",
      "name": "添加到表格",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "Appends the extracted emails into the specified Google Sheet.",
      "position": [
        64,
        192
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "Título",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Título",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Texto",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Texto",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "HECHO",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "HECHO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TIKTOK",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TIKTOK",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "SHORTS",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "SHORTS",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Fecha",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Fecha",
              "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/1mlBYMLXdNNp3yTVJHpt3nKgVmTUR4fi09dBpp3k41r8/edit#gid=0",
          "cachedResultName": "Hoja 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1mlBYMLXdNNp3yTVJHpt3nKgVmTUR4fi09dBpp3k41r8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mlBYMLXdNNp3yTVJHpt3nKgVmTUR4fi09dBpp3k41r8/edit?usp=drivesdk",
          "cachedResultName": "ideas"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "3ATVfFLykTq2D8XH",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "b69e82bf-71b9-4fca-a086-53efd0c52ad7",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2512,
        592
      ],
      "parameters": {
        "width": 272,
        "height": 192,
        "content": "## 手动触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "159c0f17-46b0-4ad1-8563-2e0bf506a164",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2128,
        576
      ],
      "parameters": {
        "width": 304,
        "height": 192,
        "content": "## 抓取Google地图 + 提取URL"
      },
      "typeVersion": 1
    },
    {
      "id": "5aaf7168-dc3b-4b49-a916-5e60de270f34",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1648,
        176
      ],
      "parameters": {
        "width": 448,
        "content": "## 过滤Google URL + 去重 + 限制"
      },
      "typeVersion": 1
    },
    {
      "id": "c71740e9-a8d2-4cb2-955b-bae9f52db2ab",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        688
      ],
      "parameters": {
        "width": 384,
        "height": 112,
        "content": "## 抓取网站 + 提取邮箱"
      },
      "typeVersion": 1
    },
    {
      "id": "164cbf16-1491-427e-b449-8921b90f78d9",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 288,
        "content": "## 添加到Google表格"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Extract Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Filter Out Empties",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Remove Duplicates (2)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Site": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract URLs": {
      "main": [
        [
          {
            "node": "Filter Google URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Emails": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Scrape Site",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Google URLs": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Out Empties": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Google Maps": {
      "main": [
        [
          {
            "node": "Extract URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates (2)": {
      "main": [
        [
          {
            "node": "Add to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Scrape Google Maps",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 潜在客户开发

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量20
分类1
节点类型11
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Jose Castillo

Jose Castillo

@j4ssn3o

Automation & Growth Engineer | Founder of Automation Hub I build practical, AI-powered workflows that help creators and businesses automate daily tasks, track performance, and make smarter decisions — all without code. Passionate about turning complex systems into simple, scalable automations.

外部链接
在 n8n.io 查看

分享此工作流