BrowserActを使用したGoogleスプレッドシートへのディレクトリクロール自動化

中級

これはLead Generation分野の自動化ワークフローで、15個のノードを含みます。主にCode, GoogleSheets, ManualTrigger, BrowserActなどのノードを使用。 YP.comディレクトリをBrowserActを使ってGoogleスプレッドシートへ自動回収

前提条件
  • Google Sheets API認証情報

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "fffRt3A8pcGDhAYV",
  "meta": {
    "instanceId": "88804d8e264d231c18413147cc92e4245b20ae7b97d774bad847556f645c8192",
    "templateCredsSetupCompleted": true
  },
  "name": "Automate Directory Scraping to Google Sheets using BrowserAct",
  "tags": [],
  "nodes": [
    {
      "id": "8ad92360-1ee6-44cb-ad18-ff1d898489b0",
      "name": "「ワークフロー実行」クリック時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -32,
        208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "281fdee8-0b6e-4f2d-b811-7376e20c14f2",
      "name": "ワークフロータスクの実行",
      "type": "n8n-nodes-browseract-workflows.browserAct",
      "position": [
        144,
        208
      ],
      "parameters": {
        "workflowId": "56683859462521975",
        "inputParameters": {
          "parameters": [
            {
              "name": "business_category",
              "value": "dentists"
            },
            {
              "name": "city_location",
              "value": "Brooklyn"
            }
          ]
        },
        "additionalFields": {
          "saveBrowserData": false
        }
      },
      "credentials": {
        "browserActApi": {
          "id": "AzKMhR2eAlOjzDiJ",
          "name": "BrowserAct account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "35073d60-1922-4fec-a162-de41e3c3a037",
      "name": "ワークフロータスクの詳細取得",
      "type": "n8n-nodes-browseract-workflows.browserAct",
      "position": [
        352,
        208
      ],
      "parameters": {
        "taskId": "={{ $json.id }}",
        "operation": "getTask",
        "maxWaitTime": 600,
        "waitForFinish": true,
        "pollingInterval": 20
      },
      "credentials": {
        "browserActApi": {
          "id": "AzKMhR2eAlOjzDiJ",
          "name": "BrowserAct account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6efa3204-54af-4b38-95a7-9996028b6166",
      "name": "JavaScriptコード",
      "type": "n8n-nodes-base.code",
      "position": [
        640,
        208
      ],
      "parameters": {
        "jsCode": "// Get the JSON string using the exact path provided by the user.\nconst jsonString = $input.first().json.output.string;\n\nlet parsedData;\n\n// Check if the string exists before attempting to parse\nif (!jsonString) {\n    // Return an empty array or throw an error if no string is found\n    // Throwing an error is usually better to stop the workflow if data is missing.\n    throw new Error(\"Input string is empty or missing at the specified path: $input.first().json.output.string\");\n}\n\ntry {\n    // 1. Parse the JSON string into a JavaScript array of objects\n    parsedData = JSON.parse(jsonString);\n} catch (error) {\n    // Handle JSON parsing errors (e.g., if the string is malformed)\n    throw new Error(`Failed to parse JSON string: ${error.message}`);\n}\n\n// 2. Ensure the parsed data is an array\nif (!Array.isArray(parsedData)) {\n    throw new Error('Parsed data is not an array. It cannot be split into multiple items.');\n}\n\n// 3. Map the array of objects into the n8n item format { json: object }\n// Each element in this array will be treated as a new item by n8n, achieving the split.\nconst outputItems = parsedData.map(item => ({\n    json: item,\n}));\n\n// 4. Return the new array of items\nreturn outputItems;"
      },
      "typeVersion": 2
    },
    {
      "id": "dc54c1f9-db58-48fd-92c1-45091fd18751",
      "name": "シートに行を追加または更新",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        944,
        208
      ],
      "parameters": {
        "columns": {
          "value": {
            "Address": "={{ $json.Location }}",
            "Category": "={{ $json.Business }}",
            "Company Name": "={{ $json.Name }}",
            "Phone Number": "={{ $json.Phone }}"
          },
          "schema": [
            {
              "id": "Company Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone Number",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Phone Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Company Name"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 512924235,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18sw7io0yJOTDzvcknGmjBBqtK154CLk3k0FoWJZbfI0/edit#gid=512924235",
          "cachedResultName": "Online Directory Lead Scraper (YP.com)"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "18sw7io0yJOTDzvcknGmjBBqtK154CLk3k0FoWJZbfI0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18sw7io0yJOTDzvcknGmjBBqtK154CLk3k0FoWJZbfI0/edit?usp=drivesdk",
          "cachedResultName": "Test For BrowserAct"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wAMAqU43zjVjlpuA",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "764d9961-c8f2-4b85-a30f-5953edec0645",
      "name": "付箋 - イントロ",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -160
      ],
      "parameters": {
        "width": 592,
        "height": 424,
        "content": "## Try It Out!\n### This n8n template helps you generate local business leads by scraping online directories and saving the results directly to a spreadsheet.\n\n### How it works\n* The workflow is triggered **manually**. You can replace the trigger with a **Cron** node to run it on a schedule for different search terms.\n* A **BrowserAct** node starts a web scraping task with specific inputs (e.g., 'dentists' in 'Brooklyn') to collect business listings.\n* A second **BrowserAct** node patiently waits for the scraping job to finish.\n* A **Code** node takes the raw scraped data (which arrives as a single text block) and correctly parses and splits it into individual items, one for each business.\n* Finally, the structured business leads are added directly to your **Google Sheet**.\n\n### Requirements\n* **BrowserAct** API account for web scraping.\n* **BrowserAct** **Online Directory Lead Scraper (YP.com)** Template.\n* **Google Sheets** credentials for saving the leads.\n\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/UpnCKd7GaU) or Visit Our [Blog](https://www.browseract.com/blog)!\n"
      },
      "typeVersion": 1
    },
    {
      "id": "708ca10f-6d70-4b8d-8a28-4e551509b05f",
      "name": "付箋 - 使用方法",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        272
      ],
      "parameters": {
        "width": 592,
        "height": 208,
        "content": "## How to use\n\n1.  **Set up Credentials:** Add your credentials for **BrowserAct** and **Google Sheets** to the workflow.\n2.  **Customize Your Search:** In the **Run a workflow task** node, change the `business_category` and `city_location` values to find the leads you need.\n3. Make sure you have **BrowserAct** **Online Directory Lead Scraper (YP.com)** Template. Ready.\n3.  **Add WorkFlow Name:** Update the **workflow_Name** in the Run Workflow node to match your specific BrowserAct scraping workflow.\n4.  **Activate Workflow:** Manually trigger the workflow by clicking 'Execute Workflow' to test it. For automation, replace the trigger with a `Cron` node and activate the workflow."
      },
      "typeVersion": 1
    },
    {
      "id": "e66f41b8-e129-4645-a969-fad9b7094770",
      "name": "付箋 - ヘルプが必要な場合",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        496
      ],
      "parameters": {
        "width": 336,
        "height": 120,
        "content": "### Need Help?\n* #### [How to Find Your BrowseAct API Key & Workflow ID](https://www.youtube.com/watch?v=pDjoZWEsZlE)\n* #### [How to Connect n8n to Browseract](https://www.youtube.com/watch?v=RoYMdJaRdcQ)\n* #### [How to Use & Customize BrowserAct Templates](https://www.youtube.com/watch?v=CPZHFUASncY)\n* #### [How to Use the BrowserAct N8N Community Node](https://youtu.be/j0Nlba2pRLU)"
      },
      "typeVersion": 1
    },
    {
      "id": "8ebf7b39-412f-42d1-b230-f5c6344c9e3e",
      "name": "付箋 - スクレイピング段階",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 416,
        "height": 168,
        "content": "### 🌐 1. Scrape & Wait\n\n* **Run a workflow task:** This node starts your BrowserAct scraper. This is where you define what you're searching for (e.g., 'dentists' and 'Brooklyn'). You can easily change these inputs to find different types of businesses.\n\n* **Get details...:** This node pauses the workflow until the scraping is 100% complete, ensuring the next steps have all the data they need."
      },
      "typeVersion": 1
    },
    {
      "id": "6bfa6f3c-b47f-4e8f-9d2d-8b49eb52a031",
      "name": "付箋 - 処理段階",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        0
      ],
      "parameters": {
        "color": 6,
        "width": 336,
        "height": 164,
        "content": "### 🧹 2. Parse & Split Data\n\nThis **Code** node is the most critical processing step. Scrapers often return a list of results as a single block of text (a JSON string). \n\nThis code takes that string, parses it, and transforms it into separate n8n items. This correctly prepares the data for the Google Sheets node to process one row at a time."
      },
      "typeVersion": 1
    },
    {
      "id": "290deae8-3767-4144-a54b-6eee32210336",
      "name": "付箋 - 出力段階",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        384
      ],
      "parameters": {
        "color": 3,
        "width": 288,
        "content": "### 💾 3. Save to Google Sheets\n\nThis node takes each individual business lead and adds it as a new row in your sheet.\n\n**💡 Tip:** The operation is set to `appendOrUpdate` and matches on 'Company Name'. This is a great setup to prevent creating duplicate entries if you run the workflow multiple times for the same search."
      },
      "typeVersion": 1
    },
    {
      "id": "897e4af5-b6c4-43c9-9dec-3ddf5d76aee8",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        192
      ],
      "parameters": {
        "color": 5,
        "width": 416,
        "height": 176,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "4fa7bfe9-c045-4768-9bb6-9e5331635a50",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        192
      ],
      "parameters": {
        "color": 6,
        "width": 336,
        "height": 176,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "31b49192-05ad-434b-8770-eb1bc279f607",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        192
      ],
      "parameters": {
        "color": 3,
        "width": 288,
        "height": 176,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c36f1e00-e08c-421e-b5c2-4d9f5c5e47f8",
      "name": "付箋 - ヘルプが必要な場合1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        496
      ],
      "parameters": {
        "height": 120,
        "content": "### Workflow Guidance and Showcase\n\n* #### [STOP Manual Leads! Automate Lead Gen with BrowserAct & n8n](https://www.youtube.com/watch?v=W9BHL7vok6c)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "277b247a-08fc-41d5-8553-3f94d74b1793",
  "connections": {
    "6efa3204-54af-4b38-95a7-9996028b6166": {
      "main": [
        [
          {
            "node": "dc54c1f9-db58-48fd-92c1-45091fd18751",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "281fdee8-0b6e-4f2d-b811-7376e20c14f2": {
      "main": [
        [
          {
            "node": "35073d60-1922-4fec-a162-de41e3c3a037",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "35073d60-1922-4fec-a162-de41e3c3a037": {
      "main": [
        [
          {
            "node": "6efa3204-54af-4b38-95a7-9996028b6166",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8ad92360-1ee6-44cb-ad18-ff1d898489b0": {
      "main": [
        [
          {
            "node": "281fdee8-0b6e-4f2d-b811-7376e20c14f2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - リード獲得

有料ですか?

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

関連ワークフロー

BrowserAct による Google Maps から Google シートへの B2B リード自動生成
自動 B2B リード生成:Google Maps から Sheets へ、BrowserAct と Telegram アラートを統合
Code
Telegram
Google Sheets
+
Code
Telegram
Google Sheets
15 ノードMadame AI Team | Kai
リード獲得
BrowserActとジェミニを使用して支援資金のあるリードを検索・フィルタリング
BrowserActとジェミニで資金のある潜在顧客を検索・フィルター
If
Code
Merge
+
If
Code
Merge
29 ノードMadame AI Team | Kai
リード獲得
BrowserActを使用してGoogleスheetsから複数の採用サイトへ仕事を公開
Google Sheets および BrowserAct を用いたマルチプラットフォーム求人情報掲載の自動化
If
Code
Slack
+
If
Code
Slack
20 ノードMadame AI Team | Kai
人事
AIを活用したリードジェネレーションシステム(メールパーソナライズとLinkedIn)
AIを活用したリードジェネレーションシステム:メールパーソナライズとLinkedIn機能を含む
If
Code
Limit
+
If
Code
Limit
51 ノードMatthieu
リード獲得
潜在顧客開掘とメールワーキングフロー
Google Maps、SendGrid、AIを使用してB2Bリード獲得とメールマーケティングを自動化
If
Set
Code
+
If
Set
Code
141 ノードEzema Kingsley Chibuzo
リード獲得
ZoomInfo、Serper、Oxylabs を使って Google Sheets への企業データ enrichment 自動化
ZoomInfo、Serper、OxylabsからGoogle Sheetsへ公司データ豊富化の自動化
If
Code
Html
+
If
Code
Html
19 ノードNaveen Choudhary
リード獲得
ワークフロー情報
難易度
中級
ノード数15
カテゴリー1
ノードタイプ5
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
Madame AI Team | Kai

Madame AI Team | Kai

@madame-ai

I’m a PhD in Physics turned AI enthusiast, passionate about uncovering how AI is transforming content creation, business, and daily life.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34