8
n8n 中文网amn8n.com

Google Maps 数据抓取与通用邮箱搜索

高级

这是一个Lead Generation, Multimodal AI领域的自动化工作流,包含 25 个节点。主要使用 If, Set, Code, Filter, ItemLists 等节点。 使用 SerpAPI 和 EmailListVerify 抓取 Google Maps 数据并发现邮箱地址

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "y8Q9qf0kUTM7rFX3",
  "meta": {
    "instanceId": "42f06bdbe33c6e48441258a73a5cbec4a66a97aff3a765b2ca73c67ed394d25f",
    "templateId": "2063"
  },
  "name": "Google Maps 数据抓取与通用邮箱搜索",
  "tags": [],
  "nodes": [
    {
      "id": "edef59f6-0197-408e-a819-141c1ca8dedd",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        864,
        592
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d56deaf5-1ad8-45a2-bbf0-3b71560f8036",
      "name": "提取下一个起始值",
      "type": "n8n-nodes-base.code",
      "position": [
        1792,
        352
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "let nextUrl\n\nif ($json && $json[\"serpapi_pagination\"] && $json[\"serpapi_pagination\"][\"next\"]) {\n    nextUrl = $json[\"serpapi_pagination\"][\"next\"];\n\n$input.item.json.start = nextUrl.split('&').find(param => param.startsWith('start=')).split('=')[1];\n}\n\n\nreturn $input.item;"
      },
      "typeVersion": 2
    },
    {
      "id": "6562c236-c957-437b-91a9-15e98af09858",
      "name": "合并来自 SERPAPI 的所有值",
      "type": "n8n-nodes-base.code",
      "position": [
        2224,
        528
      ],
      "parameters": {
        "jsCode": "const allData = []\n\nlet counter = 0;\ndo {\n  try {\n    const items = $items(\"SERPAPI - Scrape Google Maps URL\", 0, counter).map(item => item.json.local_results);\n    allData.push.apply(allData, items);\n  } catch (error) {\n    return [{json: {allData}}];  \n  }\n\n  counter++;\n} while(true);\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "357e8a57-dbb5-4241-b9c2-863b3ae3fd96",
      "name": "将数据转换为正确格式",
      "type": "n8n-nodes-base.code",
      "position": [
        2880,
        528
      ],
      "parameters": {
        "jsCode": "console.log($input.all())\n\n\nconst data = $input.all()\n\nconsole.log(\"error\",data)\n\nfunction mergeData(data) {\n    let merged = [];\n    data.forEach(entry => {\n        for (const key in entry.json) {\n            merged.push(entry.json[key]);\n        }\n    });\n    return merged;\n}\n\nconst mergedData = mergeData(data);\nconsole.log(mergedData);\n\n\nreturn mergedData.filter(item => item !== null);"
      },
      "typeVersion": 2
    },
    {
      "id": "4e8e9ae9-f5e3-4bfd-b0d4-9403a1c38d39",
      "name": "在 Google Sheets 中添加行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        4288,
        512
      ],
      "parameters": {
        "columns": {
          "value": {
            "type": "={{ $json.type }}",
            "email": "={{ $json.email }}",
            "hours": "={{ $json.hours }}",
            "phone": "={{ $json.phone }}",
            "title": "={{ $json.title }}",
            "types": "={{ $json.types }}",
            "rating": "={{ $json.rating }}",
            "address": "={{ $json.address }}",
            "data_id": "={{ $json.data_id }}",
            "reviews": "={{ $json.reviews }}",
            "website": "={{ $json.website }}",
            "data_cid": "={{ $json.data_cid }}",
            "place_id": "={{ $json.place_id }}",
            "position": "={{ $json.position }}",
            "amenities": "={{ $json.extensions[2].amenities }}",
            "thumbnail": "={{ $json.thumbnail }}",
            "confidence": "={{ $json.confidence }}",
            "open_state": "={{ $json.open_state }}",
            "photos_link": "={{ $json.photos_link }}",
            "provider_id": "={{ $json.provider_id }}",
            "reviews_link": "={{ $json.reviews_link }}",
            "gps_coordinates": "={{ $json.gps_coordinates }}",
            "operating_hours": "={{ $json.operating_hours }}",
            "place_id_search": "={{ $json.place_id_search }}"
          },
          "schema": [
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "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": "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": "type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "price",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "place_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "place_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "position",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "position",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "data_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "data_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "data_cid",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "data_cid",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews_link",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "reviews_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "photos_link",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "photos_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "gps_coordinates",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "gps_coordinates",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "place_id_search",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "place_id_search",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "provider_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "provider_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "types",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "types",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "open_state",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "open_state",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "hours",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "hours",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "operating_hours",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "operating_hours",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "service_options",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "service_options",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "order_online",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "order_online",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnail",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "thumbnail",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "editorial_reviews",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "editorial_reviews",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "unclaimed_listing",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "unclaimed_listing",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reserve_a_table",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "reserve_a_table",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "user_review",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "user_review",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "amenities",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "amenities",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "book_online",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "book_online",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "type_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type_ids",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "type_ids",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "confidence",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "confidence",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "place_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1794997208,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1d5m3tmmqM1TPL0fnrrbhaPdoXVs4EIrniDI-nv01UKg/edit#gid=1794997208",
          "cachedResultName": "Emails"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/1d5m3tmmqM1TPL0fnrrbhaPdoXVs4EIrniDI-nv01UKg/edit?gid=2023033319#gid=2023033319"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "90194aa3-5960-47bd-9e0e-efee827004c4",
      "name": "SERPAPI - 抓取 Google Maps URL",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        1568,
        544
      ],
      "parameters": {
        "url": "https://serpapi.com/search.json",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "engine",
              "value": "google_maps"
            },
            {
              "name": "q",
              "value": "={{$json?.search_parameters?.q || $json.keyword }} "
            },
            {
              "name": "ll",
              "value": "={{ $json?.search_parameters?.ll|| $json.geo }}"
            },
            {
              "name": "type",
              "value": "search"
            },
            {
              "name": "start",
              "value": "={{ $json.start|| 0 }}"
            }
          ]
        },
        "nodeCredentialType": "serpApi"
      },
      "credentials": {
        "serpApi": {
          "id": "Add your serpAPI id",
          "name": "SerpAPI account"
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "9cfd1e76-2d7c-4618-86d6-e1f3c7729044",
      "name": "移除重复项",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        3088,
        528
      ],
      "parameters": {
        "compare": "selectedFields",
        "options": {},
        "operation": "removeDuplicates",
        "fieldsToCompare": "place_id"
      },
      "typeVersion": 3.1
    },
    {
      "id": "e47dfa17-fc84-4694-950d-165302a9075f",
      "name": "拆分项目",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        2448,
        528
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "allData"
      },
      "typeVersion": 3.1
    },
    {
      "id": "decc89ee-f836-4ec2-9a1a-0371a8889ef5",
      "name": "移除空值",
      "type": "n8n-nodes-base.filter",
      "position": [
        2672,
        528
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json[0] }}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bd7ca3a5-2697-4653-abf6-372088d925e6",
      "name": "Google Sheets - 获取待抓取的搜索项",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1120,
        544
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1d5m3tmmqM1TPL0fnrrbhaPdoXVs4EIrniDI-nv01UKg/edit#gid=0",
          "cachedResultName": "Add your search url here"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/1d5m3tmmqM1TPL0fnrrbhaPdoXVs4EIrniDI-nv01UKg/edit?gid=0#gid=0"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "6d0be482-b1ad-4fa0-8d2e-bef9a4414924",
      "name": "从 URL 中提取关键词和位置",
      "type": "n8n-nodes-base.set",
      "position": [
        1344,
        544
      ],
      "parameters": {
        "fields": {
          "values": [
            {
              "name": "keyword",
              "stringValue": "={{ $json.URL.match(/\\/search\\/(.*?)\\//)[1] }}"
            },
            {
              "name": "geo",
              "stringValue": "={{ $json.URL.match(/(@[^\\/?]+)/)[1]}}"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "f6fb8db2-8444-4605-af9d-22ca71c7937d",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        176
      ],
      "parameters": {
        "width": 312.2965981499806,
        "height": 266.8807730722022,
        "content": "## 根据您的需求调整频率"
      },
      "typeVersion": 1
    },
    {
      "id": "ea2e9b89-e52c-4e25-803a-ce33c41c20fc",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        208
      ],
      "parameters": {
        "height": 511.2196121145973,
        "content": "## 复制我的模板并连接到 n8n"
      },
      "typeVersion": 1
    },
    {
      "id": "de515d8d-641d-4b91-9472-608ad3878e32",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1488,
        192
      ],
      "parameters": {
        "height": 535.9388810024284,
        "content": "## 添加您的 SERPAPI API 密钥"
      },
      "typeVersion": 1
    },
    {
      "id": "f413f4ef-fd6d-4967-8df7-a4fee4361246",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        448
      ],
      "parameters": {
        "width": 312.2965981499806,
        "height": 310.4703136043695,
        "content": "## 点击\"执行工作流\"手动运行工作流"
      },
      "typeVersion": 1
    },
    {
      "id": "cbc53e43-f141-434c-a655-feb1f7d3c65b",
      "name": "如果循环完成则继续",
      "type": "n8n-nodes-base.if",
      "position": [
        2000,
        528
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $json.search_parameters.start }}",
              "operation": "isNotEmpty"
            }
          ],
          "string": [
            {
              "value1": "={{ $json.serpapi_pagination.next }}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "229f9652-b703-490e-aa3c-c28b0fe1f2e8",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        240
      ],
      "parameters": {
        "width": 357.33341618921213,
        "height": 532.3420004517685,
        "content": "## 说明文档"
      },
      "typeVersion": 1
    },
    {
      "id": "83c6ad87-9db7-404f-b040-66a3d0c6cff7",
      "name": "便利贴5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4000,
        144
      ],
      "parameters": {
        "height": 535.9388810024284,
        "content": "## 添加您的 ELV API 密钥"
      },
      "typeVersion": 1
    },
    {
      "id": "07d9546e-39da-47e9-b550-142d2d8c3054",
      "name": "便签 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3584,
        -32
      ],
      "parameters": {
        "color": 3,
        "width": 856,
        "height": 780,
        "content": "## 查找电子邮件地址"
      },
      "typeVersion": 1
    },
    {
      "id": "234b5d18-75d7-495b-960f-06192d9e7c61",
      "name": "每周运行一次工作流",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        848,
        288
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "2d0afc14-bb0b-4558-8c7b-bfd84960d910",
      "name": "便签 7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -32
      ],
      "parameters": {
        "color": 3,
        "width": 1992,
        "height": 780,
        "content": "抓取 Google 地图"
      },
      "typeVersion": 1
    },
    {
      "id": "90ba6693-d95b-436e-9797-533890df37c7",
      "name": "将 Google 地图数据保存到 Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3328,
        528
      ],
      "parameters": {
        "columns": {
          "value": {
            "type": "={{ $json.type }}",
            "email": "={{ $json.email }}",
            "hours": "={{ $json.hours }}",
            "phone": "={{ $json.phone }}",
            "title": "={{ $json.title }}",
            "types": "={{ $json.types }}",
            "rating": "={{ $json.rating }}",
            "address": "={{ $json.address }}",
            "data_id": "={{ $json.data_id }}",
            "reviews": "={{ $json.reviews }}",
            "website": "={{ $json.website }}",
            "data_cid": "={{ $json.data_cid }}",
            "place_id": "={{ $json.place_id }}",
            "position": "={{ $json.position }}",
            "amenities": "={{ $json.extensions[2].amenities }}",
            "thumbnail": "={{ $json.thumbnail }}",
            "confidence": "={{ $json.confidence }}",
            "open_state": "={{ $json.open_state }}",
            "photos_link": "={{ $json.photos_link }}",
            "provider_id": "={{ $json.provider_id }}",
            "reviews_link": "={{ $json.reviews_link }}",
            "gps_coordinates": "={{ $json.gps_coordinates }}",
            "operating_hours": "={{ $json.operating_hours }}",
            "place_id_search": "={{ $json.place_id_search }}"
          },
          "schema": [
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "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": "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": "type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "price",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "place_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "place_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "position",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "position",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "data_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "data_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "data_cid",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "data_cid",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews_link",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "reviews_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "photos_link",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "photos_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "gps_coordinates",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "gps_coordinates",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "place_id_search",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "place_id_search",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "provider_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "provider_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "types",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "types",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "open_state",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "open_state",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "hours",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "hours",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "operating_hours",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "operating_hours",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "service_options",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "service_options",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "order_online",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "order_online",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnail",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "thumbnail",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "editorial_reviews",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "editorial_reviews",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "unclaimed_listing",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "unclaimed_listing",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reserve_a_table",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "reserve_a_table",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "user_review",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "user_review",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "amenities",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "amenities",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "book_online",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "book_online",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "type_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type_ids",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "type_ids",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "confidence",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "confidence",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "extensions",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "extensions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "unsupported_extensions",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "unsupported_extensions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "serpapi_thumbnail",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "serpapi_thumbnail",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "place_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 2023033319,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1d5m3tmmqM1TPL0fnrrbhaPdoXVs4EIrniDI-nv01UKg/edit#gid=2023033319",
          "cachedResultName": "Results"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/1d5m3tmmqM1TPL0fnrrbhaPdoXVs4EIrniDI-nv01UKg/edit?gid=2023033319#gid=2023033319"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "663f26ca-de69-420b-88e9-b79ffabbd6b4",
      "name": "检查列表是否有网站",
      "type": "n8n-nodes-base.if",
      "position": [
        3632,
        512
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "09a3895d-397b-4b0b-8f84-7aa54d5ae8fe",
              "operator": {
                "type": "string",
                "operation": "notStartsWith"
              },
              "leftValue": "={{ $json.website }}",
              "rightValue": "[undefined]"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "257df17f-c8b1-45f3-a502-26a7b2ccd5a8",
      "name": "将网站转换为域名",
      "type": "n8n-nodes-base.code",
      "position": [
        3856,
        432
      ],
      "parameters": {
        "jsCode": "console.log($input.all())\n\n\nconst data = $input.all()\n\nconsole.log(\"start filter\")\nconsole.log(data)\n\nlet merged = []\nfor (let line of data){\n  console.log(line)\n  try{\n  let lineObject = line[\"json\"]  \n  let url = lineObject[\"website\"];\n\n  let domainStart = url.indexOf(\"/\");\n  let domainEnd = url.indexOf(\"/\" ,domainStart + 2 );\n  let domain = url.slice(domainStart + 2, domainEnd);\n\n  if(domain.slice(0,4)==\"www.\"){\n    domain = domain.slice(4,domain.length)\n  }\n    \n  console.log(domain)\n  lineObject[\"domain\"] = domain;\n  merged.push(lineObject);\n  } catch (e) {\n    console.log(\"error\")\n    console.log(e)\n  }\n  \n}\n\n\n\nconsole.log(merged);\n\n\nreturn merged;"
      },
      "typeVersion": 2
    },
    {
      "id": "81386591-6f4d-4ad4-b32b-0930f62cadd9",
      "name": "使用 EmailListVerify API 查找通用邮箱",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4064,
        432
      ],
      "parameters": {
        "url": "https://api.emaillistverify.com/api/findContact",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"domain\": \"{{ $json.domain }}\"\n} ",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "Get your own EmailListVerify API key https://app.emaillistverify.com/api",
          "name": "Header Auth account 2"
        }
      },
      "typeVersion": 4.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {},
  "versionId": "7919221b-feb8-4077-a344-e91263ecdd37",
  "connections": {
    "Split out items": {
      "main": [
        [
          {
            "node": "Remove empty values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove empty values": {
      "main": [
        [
          {
            "node": "Transform data in the right format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove duplicate items": {
      "main": [
        [
          {
            "node": "Save google map data to googlesheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract next start value": {
      "main": [
        [
          {
            "node": "Continue IF Loop is complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run workflow once a week": {
      "main": [
        [
          {
            "node": "Google Sheets - Get searches  to scrap",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add rows in Google Sheets": {
      "main": [
        []
      ]
    },
    "Continue IF Loop is complete": {
      "main": [
        [
          {
            "node": "SERPAPI - Scrape Google Maps URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge all values from SERPAPI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge all values from SERPAPI": {
      "main": [
        [
          {
            "node": "Split out items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SERPAPI - Scrape Google Maps URL": {
      "main": [
        [
          {
            "node": "Extract next start value",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Google Sheets - Get searches  to scrap",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if the listing has a website": {
      "main": [
        [
          {
            "node": "Transform website into domain name",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Transform data in the right format": {
      "main": [
        [
          {
            "node": "Remove duplicate items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transform website into domain name": {
      "main": [
        [
          {
            "node": "Use EmailListVerify API to find generic emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save google map data to googlesheet": {
      "main": [
        [
          {
            "node": "Check if the listing has a website",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract keyword and location from URL": {
      "main": [
        [
          {
            "node": "SERPAPI - Scrape Google Maps URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Get searches  to scrap": {
      "main": [
        [
          {
            "node": "Extract keyword and location from URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Use EmailListVerify API to find generic emails": {
      "main": [
        [
          {
            "node": "Add rows in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 潜在客户开发, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
高级
节点数量25
分类2
节点类型10
难度说明

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

外部链接
在 n8n.io 查看

分享此工作流