Perplexity AIとGoogle Sheetsを使ってビジネスデータで会社ドメインを豊富にする
中級
これはLead Generation, AI Summarization分野の自動化ワークフローで、9個のノードを含みます。主にCode, HttpRequest, GoogleSheets, ManualTrigger, SplitInBatchesなどのノードを使用。 Perplexity AIとGoogle Sheetsを使ってビジネスデータで企業ドメインを豊富にする
前提条件
- •ターゲットAPIの認証情報が必要な場合あり
- •Google Sheets API認証情報
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "aff7017841e089b12fdff439d182db1ce6e6151977703d9243f6be0543724481",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "bffa5202-a56e-4f05-8b01-e8c4329915f3",
"name": "手動トリガー",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-480,
56
],
"parameters": {},
"typeVersion": 1
},
{
"id": "bc1ce2a3-f4b0-4cbe-a406-49ac2e339924",
"name": "未処理ドメインの取得",
"type": "n8n-nodes-base.googleSheets",
"position": [
-256,
56
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "=",
"lookupColumn": "processed"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1737567569,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1bdK8xskt-qfLlDwdzolM0zFyo9KxZ-HHpTVxcEw3ZMY/edit#gid=1737567569",
"cachedResultName": "Data"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1bdK8xskt-qfLlDwdzolM0zFyo9KxZ-HHpTVxcEw3ZMY",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1bdK8xskt-qfLlDwdzolM0zFyo9KxZ-HHpTVxcEw3ZMY/edit?usp=drivesdk",
"cachedResultName": "Get Addresses"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Y43YNvASDhLxJg65",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "e8d61653-67ef-45bd-8640-f3317c859516",
"name": "ドメインの一括処理",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-32,
56
],
"parameters": {
"options": {},
"batchSize": 10
},
"typeVersion": 3
},
{
"id": "4946ef7e-852b-4860-bef0-aa44bc0c5221",
"name": "Perplexity AIリサーチ",
"type": "n8n-nodes-base.httpRequest",
"position": [
192,
-16
],
"parameters": {
"url": "https://api.perplexity.ai/chat/completions",
"method": "POST",
"options": {},
"jsonBody": "={\n \"model\": \"sonar\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"For each of the following 10 companies, return only German addresses and provide: address split as \\\"address\\\", \\\"city\\\", \\\"state\\\", \\\"postal_code\\\", \\\"country\\\"; phone (international format); latest employee count; latest annual revenue (numbers only in USD); industry (e.g., LinkedIn industry category if available); company LinkedIn URL; and a reliable source URL as \\\"source_url\\\". Output results as an array of 10 JSON objects. If any field can't be found reliably, set it to null and don't make things. Companies: ={{ $input.all().map(item => item.json.domain) }}\"\n }\n ],\n \"response_format\": {\n \"type\": \"json_schema\",\n \"json_schema\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"companies\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"domain\": { \"type\": \"string\" },\n \"company\": { \"type\": \"string\" },\n \"address\": { \"type\": \"string\" },\n \"city\": { \"type\": \"string\" },\n \"state\": { \"type\": \"string\" },\n \"postal_code\": { \"type\": \"string\" },\n \"country\": { \"type\": \"string\" },\n \"phone\": { \"type\": \"string\" },\n \"employees\": { \"type\": \"integer\", \"nullable\": true },\n \"revenue\": { \"type\": \"number\", \"nullable\": true },\n \"industry\": { \"type\": \"string\", \"nullable\": true },\n \"linkedin_url\": { \"type\": \"string\", \"nullable\": true },\n \"source_url\": { \"type\": \"string\" }\n },\n \"required\": [\n \"domain\",\n \"company\",\n \"address\",\n \"city\",\n \"state\",\n \"postal_code\",\n \"country\",\n \"phone\",\n \"employees\",\n \"revenue\",\n \"industry\",\n \"linkedin_url\",\n \"source_url\"\n ]\n }\n }\n },\n \"required\": [\"companies\"]\n }\n }\n }\n}\n",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "perplexityApi"
},
"credentials": {
"perplexityApi": {
"id": "IRlUSoKLmF6KUhug",
"name": "Perplexity account"
}
},
"typeVersion": 4.2
},
{
"id": "9b4c6512-e43b-4568-8bbb-144ef684bb5a",
"name": "AI応答の解析",
"type": "n8n-nodes-base.code",
"position": [
416,
-16
],
"parameters": {
"jsCode": "// Step 1: Get the raw content string\nlet rawContent = $input.first().json.choices[0].message.content;\n\n// Step 2: Try to extract JSON block inside ```json ... ```\nconst match = rawContent.match(/```json\\s*([\\s\\S]*?)\\s*```/i);\n\nif (match) {\n rawContent = match[1];\n}\n\n// Step 3: Try to parse first-level JSON\nlet parsed;\ntry {\n parsed = JSON.parse(rawContent);\n\n // If it's an object with a \"companies\" key, extract the array\n if (parsed && parsed.companies && Array.isArray(parsed.companies)) {\n parsed = parsed.companies;\n }\n \n // If it's still a string (stringified JSON inside JSON), parse again\n if (typeof parsed === 'string') {\n parsed = JSON.parse(parsed);\n\n if (parsed && parsed.companies && Array.isArray(parsed.companies)) {\n parsed = parsed.companies;\n }\n }\n\n // If it's not an array at this point, return warning\n if (!Array.isArray(parsed)) {\n return [{\n json: {\n warning: \"Parsed result is not an array.\",\n type: typeof parsed,\n preview: JSON.stringify(parsed).slice(0, 300)\n }\n }];\n }\n\n} catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n return [{\n json: {\n error: \"Failed to parse JSON\",\n message,\n preview: rawContent.slice(0, 300),\n rawLength: rawContent.length\n }\n }];\n}\n\n// Step 4: Return each company as a separate item\nreturn parsed.map(company => ({ json: company }));\n"
},
"typeVersion": 2
},
{
"id": "7d2016fd-3385-4c78-a8f0-37b4dd5df146",
"name": "拡充データの保存",
"type": "n8n-nodes-base.googleSheets",
"position": [
640,
56
],
"parameters": {
"columns": {
"value": {
"city": "={{ $json.city }}",
"phone": "={{ $json.phone.replace(\"+\", \"'+\") }}",
"state": "={{ $json.state }}",
"domain": "={{ $json.domain }}",
"address": "={{ $json.address }}",
"company": "={{ $json.company }}",
"country": "={{ $json.country }}",
"revenue": "={{ $json.revenue }}",
"industry": "={{ $json.industry }}",
"postCode": "={{ $json.postal_code }}",
"employees": "={{ $json.employees }}",
"processed": "true",
"source_url": "={{ $json.source_url }}",
"companyLinkedinUrl": "={{ $json.linkedin_url }}"
},
"schema": [
{
"id": "domain",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "domain",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "company",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "address",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "city",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "city",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "state",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "state",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "postCode",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "postCode",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "country",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "country",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "employees",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "employees",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "revenue",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "revenue",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "industry",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "industry",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "companyLinkedinUrl",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "companyLinkedinUrl",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "source_url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "source_url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "processed",
"type": "string",
"display": true,
"required": false,
"displayName": "processed",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"domain"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1737567569,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1bdK8xskt-qfLlDwdzolM0zFyo9KxZ-HHpTVxcEw3ZMY/edit#gid=1737567569",
"cachedResultName": "Data"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1bdK8xskt-qfLlDwdzolM0zFyo9KxZ-HHpTVxcEw3ZMY",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1bdK8xskt-qfLlDwdzolM0zFyo9KxZ-HHpTVxcEw3ZMY/edit?usp=drivesdk",
"cachedResultName": "Get Addresses"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Y43YNvASDhLxJg65",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6,
"alwaysOutputData": true
},
{
"id": "5ea0a567-0a88-4724-acc7-f654930c3ae7",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
-352
],
"parameters": {
"width": 896,
"height": 656,
"content": "🏢 COMPANY DATA ENRICHMENT SYSTEM\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n🎯 Automatically enriches company domains with detailed business data using Perplexity AI\n\n📊 PROCESS FLOW:\n1. Reads unprocessed domains from Google Sheets\n2. Batches domains (10 per request) for cost efficiency \n3. Uses Perplexity AI to research German addresses + business data\n4. Parses AI response and saves enriched data back to sheets\n5. Marks domains as \"processed\" to avoid duplicates\n\n⏱️ Runtime: ~2-3 minutes per batch | 💰 Cost: ~$0.005 per 10 domains\n🔄 Resumable: Only processes unprocessed domains | 🌍 Focus: German addresses (can be customized to HQ addresses)"
},
"typeVersion": 1
},
{
"id": "00024d69-8567-4c12-bf92-d54bb5686bd6",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-864,
-352
],
"parameters": {
"color": 5,
"width": 544,
"height": 656,
"content": "🚀 SETUP CHECKLIST\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n📋 GOOGLE SHEETS:\n🔗 [MAKE A COPY of this template](https://docs.google.com/spreadsheets/d/1bdK8xskt-qfLlDwdzolM0zFyo9KxZ-HHpTVxcEw3ZMY/edit?usp=sharing)\n⚠️ Update Sheet ID in both Google Sheets nodes after copying\n\n📝 Required columns: domain, processed\n📊 Tab: Data | Filter: processed = \"\" (empty only)\n\n🔐 API CREDENTIALS NEEDED:\n✅ Perplexity AI API key\n✅ Google Sheets OAuth2 authentication\n\n⚙️ Batch size: 10 domains (adjustable in \"Batch Process Domains\" node)"
},
"typeVersion": 1
},
{
"id": "0609a728-9743-4a92-b64d-a63eec993333",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
608,
-352
],
"parameters": {
"color": 4,
"width": 544,
"height": 656,
"content": "📊 OUTPUT DATA FIELDS\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n✅ ENRICHED DATA SAVED:\n- Company name, complete address\n- Phone (international), employee count, revenue (USD)\n- Industry, LinkedIn URL, source URL\n- processed = \"true\" (tracking field)\n\n🛡️ ERROR HANDLING:\n- Parse failures → Detailed error info in output\n- Missing data → AI sets fields to null (no fake data)\n- Rate limiting → Reduce batch size if needed\n\n📈 MONITORING:\n- Check \"processed\" column for completion status\n- Review \"source_url\" for data reliability\n- Monitor costs in Perplexity dashboard"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"bffa5202-a56e-4f05-8b01-e8c4329915f3": {
"main": [
[
{
"node": "bc1ce2a3-f4b0-4cbe-a406-49ac2e339924",
"type": "main",
"index": 0
}
]
]
},
"9b4c6512-e43b-4568-8bbb-144ef684bb5a": {
"main": [
[
{
"node": "7d2016fd-3385-4c78-a8f0-37b4dd5df146",
"type": "main",
"index": 0
}
]
]
},
"7d2016fd-3385-4c78-a8f0-37b4dd5df146": {
"main": [
[
{
"node": "e8d61653-67ef-45bd-8640-f3317c859516",
"type": "main",
"index": 0
}
]
]
},
"e8d61653-67ef-45bd-8640-f3317c859516": {
"main": [
[],
[
{
"node": "4946ef7e-852b-4860-bef0-aa44bc0c5221",
"type": "main",
"index": 0
}
]
]
},
"4946ef7e-852b-4860-bef0-aa44bc0c5221": {
"main": [
[
{
"node": "9b4c6512-e43b-4568-8bbb-144ef684bb5a",
"type": "main",
"index": 0
}
]
]
},
"bc1ce2a3-f4b0-4cbe-a406-49ac2e339924": {
"main": [
[
{
"node": "e8d61653-67ef-45bd-8640-f3317c859516",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - リード獲得, AI要約
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
ZoomInfo、Serper、Oxylabs を使って Google Sheets への企業データ enrichment 自動化
ZoomInfo、Serper、OxylabsからGoogle Sheetsへ公司データ豊富化の自動化
If
Code
Html
+
If
Code
Html
19 ノードNaveen Choudhary
リード獲得
潜在顧客開掘とメールワーキングフロー
Google Maps、SendGrid、AIを使用してB2Bリード獲得とメールマーケティングを自動化
If
Set
Code
+
If
Set
Code
141 ノードEzema Kingsley Chibuzo
リード獲得
Google Sheets、SerpAPI、Apify、GPT-4o を使ってローカル企業の連絡先を抽出
Google Sheets、SerpAPI、Apify、GPT-4oを使ってローカルの企業連絡先を取得する
Code
Filter
Summarize
+
Code
Filter
Summarize
18 ノードRobert Breen
リード獲得
Bright DataとGoogle Geminiを使用したGoogle Mapsビジネス情報スクレイピングとリードリッチ化
Bright DataとGoogle Geminiを利用したGoogle Maps企業情報スクレイピングとリードリッチ化ツール
Set
Code
Wait
+
Set
Code
Wait
29 ノードRanjan Dailata
リード獲得
AI駆動のGoogle Mapsビジネスデータスクレイピングとスプレッドシート出力
AIを基盤としたGoogle Mapsビジネスデータの収集、データの充実化、スプレッドシートへのエクスポートをサポート
If
Code
Wait
+
If
Code
Wait
25 ノードMsaid Mohamed el hadi
リード獲得
AIを活用したリードスコアリングとパーソナライズ返信(JotForm、GPT、Gmail)
AIを活用したリードスコアリングとパーソナライズ返信:JotForm、GPT、Gmailの使用
Code
Gmail
Http Request
+
Code
Gmail
Http Request
15 ノードNaveen Choudhary
リードナーチャリング
ワークフロー情報
難易度
中級
ノード数9
カテゴリー2
ノードタイプ6
作成者
Naveen Choudhary
@n8nsteinI create AI-driven n8n workflows that turn repetitive tasks into smooth, hands-off automations. Want to explore an idea? Book a quick consult: https://cal.com/nickchoudhary/30min
外部リンク
n8n.ioで表示 →
このワークフローを共有