Googleマップ - キーワードによるメールアドレスのスクレイピング

上級

これはLead Generation分野の自動化ワークフローで、20個のノードを含みます。主にSet, Code, Filter, SplitOut, Aggregateなどのノードを使用。 Googleマップの検索結果から商業用メールアドレスをGoogleスプレッドシートに抽出

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "wbY4XFrDGp8DBQgi",
  "meta": {
    "instanceId": "ed6d846a2fce1f660ede2e7da800724cca01dc3d0685524a3c917881b7cfcfe9"
  },
  "name": "Google Maps - Crawl Email By Keyword",
  "tags": [],
  "nodes": [
    {
      "id": "59b4ce0a-ddf4-4fc4-8adc-c25aec2008d7",
      "name": "「Test workflow」クリック時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -680,
        200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7d1e4c89-b5f0-49a0-ad67-0eb89dbc0680",
      "name": "フィルター",
      "type": "n8n-nodes-base.filter",
      "position": [
        280,
        200
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "7ecfbe72-c09a-482e-8f81-43d9e7bb2917",
              "operator": {
                "type": "string",
                "operation": "notRegex"
              },
              "leftValue": "={{ $json.url }}",
              "rightValue": "(google|gstatic|ggpht|schema|example)"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "dc7e6daa-0aa0-4fad-a32f-e6aa3bd905e6",
      "name": "集計",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1400,
        200
      ],
      "parameters": {
        "options": {
          "mergeLists": true
        },
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "emails"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0c6199c1-7272-41b6-b765-bc89e5fc4925",
      "name": "分割",
      "type": "n8n-nodes-base.splitOut",
      "onError": "continueRegularOutput",
      "position": [
        1600,
        200
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "emails"
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "05de993d-c2e5-44b5-accc-afa324e90c36",
      "name": "サイト重複削除",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        500,
        200
      ],
      "parameters": {
        "compare": "selectedFields",
        "options": {},
        "fieldsToCompare": "url"
      },
      "typeVersion": 2
    },
    {
      "id": "f5445655-192b-493b-8bb7-2dad086133c4",
      "name": "メール重複削除",
      "type": "n8n-nodes-base.removeDuplicates",
      "onError": "continueRegularOutput",
      "position": [
        1800,
        200
      ],
      "parameters": {
        "compare": "selectedFields",
        "options": {},
        "fieldsToCompare": "emails"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "fdf831d5-a819-413f-87e2-6d6bdba7d27a",
      "name": "Google Sheets - データ更新",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2000,
        200
      ],
      "parameters": {
        "columns": {
          "value": {
            "Emails": "={{ $json.emails }}",
            "Keyword": "={{ $('Fields - Set Keyword / Phrase').first().json.keyword }}"
          },
          "schema": [
            {
              "id": "Keyword",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Keyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Emails",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Emails",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Emails"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17y_MmRHfBbW67bVyRuep1hkpoh2BV3yF5_Woxt0W9kk/edit#gid=0",
          "cachedResultName": "Emails"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "17y_MmRHfBbW67bVyRuep1hkpoh2BV3yF5_Woxt0W9kk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17y_MmRHfBbW67bVyRuep1hkpoh2BV3yF5_Woxt0W9kk/edit?usp=drivesdk",
          "cachedResultName": "Google Maps - Crawl Email By Keyword"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "pe6UD1A6MWIk2X91",
          "name": "Google Sheets - toan.ngo"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "6483643a-ca6d-4708-aa6e-0f279aef4991",
      "name": "ウェブサイトループ",
      "type": "n8n-nodes-base.splitInBatches",
      "onError": "continueErrorOutput",
      "position": [
        720,
        200
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "2faaf6c1-00f1-44e8-8d84-229e85718a64",
      "name": "メールアドレスループ",
      "type": "n8n-nodes-base.splitInBatches",
      "onError": "continueErrorOutput",
      "position": [
        940,
        360
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "bc5361c6-21ca-4011-97f9-313504681019",
      "name": "HTTP Request - メール取得",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        940,
        0
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "a25ea232-e3c0-4f15-a2c7-c340245eaee5",
      "name": "HTTP Request - サイト取得",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -140,
        200
      ],
      "parameters": {
        "url": "=https://www.google.com/maps/search/{{ $json.keyword }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "a9867f9c-0841-432f-b25f-b179c74819b1",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -780,
        -260
      ],
      "parameters": {
        "color": 4,
        "width": 600,
        "height": 800,
        "content": "## 1. Set The Keyword & Start The Workflow\n- A target keyword (e.g., “n8n workflow”) should be entered in Node **Fields - Set Keyword / Phrase**.\n- Then, the process is triggered by clicking **Test Workflow** or **Execute Workflow**.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cd625a6d-a8be-4e37-b6a8-e09c2c67cbbc",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -520,
        120
      ],
      "parameters": {
        "color": 3,
        "width": 300,
        "height": 240,
        "content": "## Change Keyword Here"
      },
      "typeVersion": 1
    },
    {
      "id": "f0a61644-cc59-4938-980f-88795742d9a4",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        -260
      ],
      "parameters": {
        "width": 720,
        "height": 1680,
        "content": "## [n8n Automation] Automated Email Extractor By Keyword From Google Maps - Try It Out!\n**This workflow demonstrates how to automate the extraction of business emails from Google Maps results using a specific keyword. It streamlines the process of finding, filtering, and saving contact emails into a Google Sheet, eliminating the need for tedious manual research.**\n\nThis tool is perfect for those who need to collect business email addresses for outreach, research, or marketing purposes, especially those whose success depends on building and managing business relationships at scale.\n- **Sales and Lead Generation Teams**: Quickly build targeted business email lists for efficient cold outreach and follow-up.\n- **Marketing Agencies and Freelancers**: Effortlessly gather contact details for potential clients in specific niches or locations to power outreach campaigns.\n- **Recruiters and Talent Acquisition Specialists**: Easily collect company contacts to connect with HR or hiring managers in targeted industries or regions.\n- **Event Organizers and B2B Promoters**: Rapidly compile relevant business emails for event invitations, sponsorship proposals, or promotional efforts.\n- **Market Researchers and Data Analysts**: Automate large-scale collection of business emails to support industry analysis and data-driven research.\n\n## How It Works\n- A target keyword (e.g., “n8n workflow”) should be entered in Node **Fields - Set Keyword / Phrase**.\n- Then, the process is triggered by clicking **Test Workflow** or **Execute Workflow**.\n- The workflow queries Google Maps, collects keyword-related website URLs from its HTML, and filters for only valid website URLs.\n- Next, it removes duplicate website URLs to ensure each is processed only once later.\n- For every unique valid website URL, the workflow sends an HTTP request to extract all potential email addresses from the website’s content in a loop.\n- After that, the emails are passed through another loop and a code node (**Code – Match Email**) to ensure each one is a valid, properly formatted email address (not just random text). Any invalid emails are filtered out during this step.\n- All valid emails are then collected and prepared for further processing.\n- The workflow then splits out the results and removes any duplicate emails to ensure each address appears only once.\n- Finally, the list of unique, verified emails (directly related to your chosen keyword) is saved to your connected Google Sheet for easy access and follow-up.\n\n## How To Set Up\n- Download the working package.\n- Import the package into your n8n interface.\n- Duplicate the [**Google Maps - Crawl Emails By Keyword Google Sheets template**](https://docs.google.com/spreadsheets/d/17y_MmRHfBbW67bVyRuep1hkpoh2BV3yF5_Woxt0W9kk/edit?gid=0#gid=0) into your Google Sheets account. \n- Set up necessary credentials in Google Cloud Console for Google Sheets access and usability in Node **Google Sheets - Update Data**.\n- Set up a GET method to access Google Maps in Node **HTTP Request - Get Sites**.\n- Enter your desired keyword or phrase in Node **Fields - Set Keyword / Phrase**.\n- Start the workflow in n8n.\n- Wait a few minutes for the process to finish.\n- Check the list of all valid emails related to your keyword/phrase in the connected Google Sheet.\n\n## Requirements\n- Basic setup in **Google Cloud Console** (OAuth or API Key method enabled) with enabled access to **Google Sheets**.\n- Access to **Google Maps**.\n\n## How To Customize\n- **Adjust the Keyword Input**: You can easily change the keyword or phrase you want to search for by editing the second node, **Fields – Set Keyword / Phrase**, in your n8n workflow.\n- **Add Follow-up Steps**: Modify the workflow to even trigger follow-up actions like sending emails automatically.\n## Need Help?\nIf you need a step-by-step guide to set up this workflow or want it customized for your specific business needs, feel free to reach out to [**Agent Circle**](https://www.agentcircle.ai/). We’re always here to support and help you to bring automation ideas to life.\nJoin our community on different platforms for assistance, inspiration and tips from others.\nWebsite: https://www.agentcircle.ai/\nEtsy: https://www.etsy.com/shop/AgentCircle\nGumroad: http://agentcircle.gumroad.com/\nDiscord Global: https://discord.gg/d8SkCzKwnP\nFB Page Global: https://www.facebook.com/agentcircle/\nFB Group Global: https://www.facebook.com/groups/aiagentcircle/\nX: https://x.com/agent_circle\nYouTube: https://www.youtube.com/@agentcircle\nLinkedIn: https://www.linkedin.com/company/agentcircle\n\n\n\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "352594b0-528b-45c6-a110-b38db22c716d",
      "name": "Code - URL照合",
      "type": "n8n-nodes-base.code",
      "position": [
        80,
        200
      ],
      "parameters": {
        "jsCode": "const urls = $input.first().json.data.match(/https?:\\/\\/[^\\/]+/g);\nreturn urls.map(url => ({json: {url: url}}));"
      },
      "typeVersion": 2
    },
    {
      "id": "a82989e4-69c0-485e-8158-2ed201baf6f7",
      "name": "Code - メール照合",
      "type": "n8n-nodes-base.code",
      "onError": "continueRegularOutput",
      "position": [
        1200,
        360
      ],
      "parameters": {
        "jsCode": "const blockExtensions = [\n  'png', 'jpg', 'jpeg', 'gif', 'webp', 'svg',\n  'mp4', 'avi', 'mov', 'webm', 'mkv',\n  'js', 'css', 'json', 'ts', 'jsx', 'tsx'\n];\n\nconst regex = new RegExp(\n  `[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.(?!${blockExtensions.join('|')})[a-zA-Z]{2,}`,\n  'gi'\n);\n\nconst text = $input.first().json.data;\nconst emails = text.match(regex);\n\nreturn { json: { emails: emails } };"
      },
      "typeVersion": 2
    },
    {
      "id": "f74128d6-40bb-4c6b-8278-90d653a495f4",
      "name": "Fields - キーワード/フレーズ設定",
      "type": "n8n-nodes-base.set",
      "position": [
        -420,
        200
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0543578e-56af-4bd7-b05f-f61652f47315",
              "name": "keyword",
              "type": "string",
              "value": "n8n workflow"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6e41a17b-59bc-4cc0-9db0-77613e660b35",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -260
      ],
      "parameters": {
        "color": 4,
        "width": 820,
        "height": 800,
        "content": "## 2. Collect & Filter Website URLs\n- The workflow queries Google Maps, collects keyword-related website URLs from its HTML, and filters for only valid website URLs.\n- Duplicate website URLs are removed to ensure each website is only processed once.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8babfc9b-4c40-434a-8887-257e3baa7984",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        -260
      ],
      "parameters": {
        "color": 4,
        "width": 680,
        "height": 800,
        "content": "## 3. Extract & Validate Emails\n- The unique valid website URLs will be sent to a loop.\n- For each of them, the workflow sends an HTTP request to extract all potential email addresses from its website’s content.\n- After that, the emails are passed through another loop (**Loop Emails**) and a code node (**Code – Match Email**) to ensure each one is a valid, properly formatted email address (not just random text). Any invalid emails are filtered out during this step."
      },
      "typeVersion": 1
    },
    {
      "id": "669fcf0e-34e0-445e-8491-97ff3f493cba",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1380,
        -260
      ],
      "parameters": {
        "color": 4,
        "width": 780,
        "height": 800,
        "content": "## 4. Aggregate, Deduplicate & Save Results\n- All valid emails are collected, and duplicates are removed.\n- The final list of unique, verified emails is saved to your connected Google Sheet for easy access and follow-up.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b27f6a74-6321-4082-b1fd-c124a513b6e7",
  "connections": {
    "7d1e4c89-b5f0-49a0-ad67-0eb89dbc0680": {
      "main": [
        [
          {
            "node": "05de993d-c2e5-44b5-accc-afa324e90c36",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dc7e6daa-0aa0-4fad-a32f-e6aa3bd905e6": {
      "main": [
        [
          {
            "node": "0c6199c1-7272-41b6-b765-bc89e5fc4925",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0c6199c1-7272-41b6-b765-bc89e5fc4925": {
      "main": [
        [
          {
            "node": "f5445655-192b-493b-8bb7-2dad086133c4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2faaf6c1-00f1-44e8-8d84-229e85718a64": {
      "main": [
        [
          {
            "node": "dc7e6daa-0aa0-4fad-a32f-e6aa3bd905e6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "a82989e4-69c0-485e-8158-2ed201baf6f7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6483643a-ca6d-4708-aa6e-0f279aef4991": {
      "main": [
        [
          {
            "node": "2faaf6c1-00f1-44e8-8d84-229e85718a64",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "bc5361c6-21ca-4011-97f9-313504681019",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a82989e4-69c0-485e-8158-2ed201baf6f7": {
      "main": [
        [
          {
            "node": "2faaf6c1-00f1-44e8-8d84-229e85718a64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "352594b0-528b-45c6-a110-b38db22c716d": {
      "main": [
        [
          {
            "node": "7d1e4c89-b5f0-49a0-ad67-0eb89dbc0680",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "05de993d-c2e5-44b5-accc-afa324e90c36": {
      "main": [
        [
          {
            "node": "6483643a-ca6d-4708-aa6e-0f279aef4991",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f5445655-192b-493b-8bb7-2dad086133c4": {
      "main": [
        [
          {
            "node": "fdf831d5-a819-413f-87e2-6d6bdba7d27a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a25ea232-e3c0-4f15-a2c7-c340245eaee5": {
      "main": [
        [
          {
            "node": "352594b0-528b-45c6-a110-b38db22c716d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bc5361c6-21ca-4011-97f9-313504681019": {
      "main": [
        [
          {
            "node": "6483643a-ca6d-4708-aa6e-0f279aef4991",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f74128d6-40bb-4c6b-8278-90d653a495f4": {
      "main": [
        [
          {
            "node": "a25ea232-e3c0-4f15-a2c7-c340245eaee5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "59b4ce0a-ddf4-4fc4-8adc-c25aec2008d7": {
      "main": [
        [
          {
            "node": "f74128d6-40bb-4c6b-8278-90d653a495f4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - リード獲得

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
上級
ノード数20
カテゴリー1
ノードタイプ11
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

作成者
Agent Circle

Agent Circle

@agentcircle

Agent Circle - A growing marketplace of AI agents, workflows, and toolkits — built to help teams automate smarter and scale faster

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34