8
n8n 한국어amn8n.com

Perplexity AI와 Google 스프레드시트를 사용하여 비즈니스 데이터를 통해 회사 도메인을 풍부화

중급

이것은Lead Generation, AI Summarization분야의자동화 워크플로우로, 9개의 노드를 포함합니다.주로 Code, HttpRequest, GoogleSheets, ManualTrigger, SplitInBatches 등의 노드를 사용하며. Perplexity AI와 Google 시트를 통해 비즈니스 데이터를 활용하여 회사 도메인을 풍부화

사전 요구사항
  • 대상 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)는 사용자 직접 비용을 지불해야 할 수 있습니다.

관련 워크플로우 추천

워크플로우 정보
난이도
중급
노드 수9
카테고리2
노드 유형6
난이도 설명

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

저자
Naveen Choudhary

Naveen Choudhary

@n8nstein

I 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에서 보기

이 워크플로우 공유

카테고리

카테고리: 34