8
n8n 한국어amn8n.com

AI 기반 구글 지도 비즈니스 데이터 스크래핑 및 스프레드시트 내보내기

고급

이것은Lead Generation, AI Summarization분야의자동화 워크플로우로, 25개의 노드를 포함합니다.주로 If, Code, Wait, Merge, Filter 등의 노드를 사용하며. AI를 활용한 구글 지도 비즈니스 데이터 수집 워크플로우로, 데이터를 보강하여 스프레드시트로 내보낼 수 있습니다.

사전 요구사항
  • 대상 API의 인증 정보가 필요할 수 있음
  • Google Sheets API 인증 정보
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "meta": {},
  "nodes": [
    {
      "id": "79df5316-c210-478d-a4de-35b5d31924ee",
      "name": "중복 URL 제거",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        2000,
        980
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "985ac7e3-b501-4079-a043-780677c94b52",
      "name": "쿼리 반복 실행",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1500,
        580
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "3a478935-781b-4fb1-bdc7-fcf8be1334bc",
      "name": "쿼리로 구글 지도 검색",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1280,
        980
      ],
      "parameters": {
        "url": "=https://www.google.com/maps/search/{{ $json.query }}",
        "options": {
          "allowUnauthorizedCerts": false
        }
      },
      "executeOnce": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "477e7d55-b7d6-4b20-ac44-dd1f443e270a",
      "name": "결과에서 URL 스크래핑",
      "type": "n8n-nodes-base.code",
      "position": [
        1480,
        980
      ],
      "parameters": {
        "jsCode": "const data = $input.first().json.data\n\nconst regex = /https?:\\/\\/[^\\/]+/g\n\nconst urls = data.match(regex)\n\nreturn urls.map(url => ({json: {url: url}}))"
      },
      "typeVersion": 2
    },
    {
      "id": "a5b67e45-a3f6-41d2-aa58-c26a441c41b2",
      "name": "관련 없는 URL 필터링",
      "type": "n8n-nodes-base.filter",
      "position": [
        1680,
        980
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "041797f2-2fe2-41dc-902a-d34050b9b304",
              "operator": {
                "type": "string",
                "operation": "notRegex"
              },
              "leftValue": "={{ $json.url }}",
              "rightValue": "=(google|gstatic|ggpht|schema\\.org|example\\.com|sentry-next\\.wixpress\\.com|imli\\.com|sentry\\.wixpress\\.com|ingest\\.sentry\\.io)"
            },
            {
              "id": "eb499a7e-17bc-453c-be08-a47286f726dd",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "12f662a8-c55f-409a-b381-f37ab6dd3794",
      "name": "URL 반복 실행",
      "type": "n8n-nodes-base.splitInBatches",
      "onError": "continueErrorOutput",
      "position": [
        2640,
        980
      ],
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "typeVersion": 3
    },
    {
      "id": "93437e8b-4f8d-40a1-9585-cab1b556164a",
      "name": "스크래퍼 워크플로우 시작",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        800,
        980
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "dffaf04e-d1d2-4002-9a69-f0904b61fc2d",
      "name": "실행 간 대기",
      "type": "n8n-nodes-base.wait",
      "position": [
        2300,
        600
      ],
      "webhookId": "40eb11a9-0f7d-4932-993e-0052b69dbf9b",
      "parameters": {
        "unit": "minutes",
        "amount": 20
      },
      "typeVersion": 1.1
    },
    {
      "id": "18787007-1d11-41b9-89c3-d5f69756eda7",
      "name": "쿼리에 대한 스크래퍼 실행",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1800,
        600
      ],
      "parameters": {
        "mode": "each",
        "options": {
          "waitForSubWorkflow": false
        },
        "workflowId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $workflow.id }}"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "9fa06f2a-0e7a-43e1-b997-4b4288a990cd",
      "name": "AI 에이전트",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        4260,
        1360
      ],
      "parameters": {
        "text": "={{ $json.prompt }}",
        "options": {
          "systemMessage": "You are an expert business analyst.\n\nGiven a business website data, generate a JSON object with key business information and a detailed, insightful description that could be used to prepare for outreach or partnership discussions.\n\nFocus the description on:\n\n- What the business does (products/services)\n- Their strengths or market position\n- Technologies or platforms used (if identifiable)\n- Unique value proposition\n- Target customers\n- Any possible gaps, pain points, or areas for improvement\n- Why this business could benefit from external collaboration (e.g., automation, digital transformation, SEO, AI tools)\n\nFormat the output as a single JSON object with these fields:\n\n- business_name\n- website_url\n- email\n- phone_number\n- address\n- city\n- postal_code\n- country\n- latitude\n- longitude\n- category\n- subcategory\n- opening_hours\n- social_media_links (array)\n- about_us\n- services (array)\n- contact_page_url\n- privacy_policy_url\n- terms_conditions_url\n- logo_url\n- languages (array)\n- keywords (array)\n- google_maps_url\n- ai_description_detailed (a detailed paragraph or two with everything above)\n\nOnly output valid JSON.\nif prompt is empty just return empty json data "
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "c191a15f-2457-49c1-976b-90b0caaf3835",
      "name": "OpenRouter 채팅 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        4260,
        1620
      ],
      "parameters": {
        "model": "google/gemini-2.5-flash-lite-preview-06-17",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "tC9q2VizRVbSvlww",
          "name": "OpenRouter account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "20c5612b-8fbf-4eb4-8f95-ca17acc5f0e2",
      "name": "코드",
      "type": "n8n-nodes-base.code",
      "position": [
        4680,
        960
      ],
      "parameters": {
        "jsCode": "const allPromptResults = $input.first().json.data.map(item => item.promptResult).join('\\n');\n\n\nreturn {\n  \"prompt\":allPromptResults\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "53d2251a-f7bb-43b1-8035-c7ac74e0aa62",
      "name": "집계",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        4420,
        960
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "67dfef97-0fc2-4fa8-a7a8-08c491f8785f",
      "name": "일정 트리거",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1060,
        580
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cb651c6d-eac0-44bc-8d80-c07c5a65ce6a",
      "name": "시트에서 행 가져오기",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1280,
        580
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "processed"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1652190371,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks/edit#gid=1652190371",
          "cachedResultName": "keywords"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks/edit?usp=drivesdk",
          "cachedResultName": "google maps  bussiness informations"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "c7TYv7ZcF6y7LGEQ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "423dce21-e06d-4bd2-833b-976b3ce9e231",
      "name": "시트에서 행 업데이트",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2040,
        600
      ],
      "parameters": {
        "columns": {
          "value": {
            "query": "={{ $json.query }}",
            "processed": "TRUE"
          },
          "schema": [
            {
              "id": "query",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "query",
              "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": [
            "query"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1652190371,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks/edit#gid=1652190371",
          "cachedResultName": "keywords"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks/edit?usp=drivesdk",
          "cachedResultName": "google maps  bussiness informations"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "c7TYv7ZcF6y7LGEQ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "a996171f-c358-471d-91ba-b6c9950e7edf",
      "name": "조건문",
      "type": "n8n-nodes-base.if",
      "position": [
        3940,
        980
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "7eec5545-99ac-410a-87ec-4e5f79e30202",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.dontExist }}",
              "rightValue": ""
            },
            {
              "id": "96fe4cf5-4689-4140-8a75-8bdbc893b363",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4575083d-5d45-497e-a5d1-5c369f2d7b91",
      "name": "병합",
      "type": "n8n-nodes-base.merge",
      "position": [
        3660,
        980
      ],
      "parameters": {
        "mode": "combineBySql",
        "query": "SELECT * FROM input1 LEFT JOIN input2 ON 1=1",
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "73814b4e-ab19-4a06-b180-a2997e43bdbd",
      "name": "문자열을 JSON 객체로 변환",
      "type": "n8n-nodes-base.code",
      "onError": "continueRegularOutput",
      "position": [
        4640,
        1360
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "\n\nlet raw = $json.output;\n\n// Remove ```json or ``` wrapping if it exists\nraw = raw.replace(/^```json\\s*|\\s*```$/g, '').trim();\n\nlet outputJson;\n\ntry {\n  outputJson = JSON.parse(raw);\n} catch (err) {\n  outputJson = { error: 'Invalid JSON format in promptResult' };\n}\n\nreturn {\n  json: outputJson\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "54d94ef2-84cf-4568-a9d5-28ec9a818ffd",
      "name": "DATA를 Google Sheet1에 저장",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5060,
        1360
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "Business Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Business Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone Number",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Phone Number",
              "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": "Postal Code",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Postal Code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Country",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Country",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Latitude",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Latitude",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Longitude",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Longitude",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Category",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subcategory",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Subcategory",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Opening Hours",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Opening Hours",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Social Media Links",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Social Media Links",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "About Us",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "About Us",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Services",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Services",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Contact Page URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Contact Page URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Privacy Policy URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Privacy Policy URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Terms & Conditions URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Terms & Conditions URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Logo URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Logo URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Languages",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Languages",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Keywords",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Keywords",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Google Maps URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Google Maps URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI Description",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "AI Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks/edit?usp=drivesdk",
          "cachedResultName": "google maps  bussiness informations"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "c7TYv7ZcF6y7LGEQ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "40ec6d1f-1c98-4c9f-8499-c5893c3df7b9",
      "name": "APIFY 사용",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        4200,
        960
      ],
      "parameters": {
        "url": "=https://api.apify.com/v2/acts/mohamedgb00714~firescraper-ai-prompt-website-content-markdown-scraper/run-sync-get-dataset-items?token=apify_api_DUMMY_TOKEN",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"enqueue\": true,\n  \"getHtml\": false,\n  \"getText\": false,\n  \"prompt\": \"You are an expert business analyst.\\n\\nGiven a business website URL, generate a JSON object with key business information and a detailed, insightful description that could be used to prepare for outreach or partnership discussions.\\n\\nFocus the description on:\\n\\n- What the business does (products/services)\\n- Their strengths or market position\\n- Technologies or platforms used (if identifiable)\\n- Unique value proposition\\n- Target customers\\n- Any possible gaps, pain points, or areas for improvement\\n- Why this business could benefit from external collaboration (e.g., automation, digital transformation, SEO, AI tools)\\n\\nFormat the output as a single JSON object with these fields:\\n\\n- business_name\\n- website_url\\n- email\\n- phone_number\\n- address\\n- city\\n- postal_code\\n- country\\n- latitude\\n- longitude\\n- category\\n- subcategory\\n- opening_hours\\n- social_media_links (array)\\n- about_us\\n- services (array)\\n- contact_page_url\\n- privacy_policy_url\\n- terms_conditions_url\\n- logo_url\\n- languages (array)\\n- keywords (array)\\n- google_maps_url\\n- ai_description_detailed (a detailed paragraph or two with everything above)\\n\\nOnly output valid JSON.\",\n  \"screenshot\": false,\n  \"startUrls\": [\n    {\n      \"url\": \"{{$json.url}}\",\n      \"method\": \"GET\"\n    }\n  ]\n}\n",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "e4997964-dc80-4778-9f79-ae4dc9e41284",
      "name": "존재하는 경우 레코드 가져오기",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueErrorOutput",
      "position": [
        2900,
        1300
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1si2IQusnIF-Br8JdXSVd_Z9QvnXrKcieXOkxI0Xz9ks/edit?usp=drivesdk",
          "cachedResultName": "google maps  bussiness informations"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "c7TYv7ZcF6y7LGEQ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6,
      "alwaysOutputData": true
    },
    {
      "id": "d2380d4e-20a5-48bb-9d87-3f2c638f2fc7",
      "name": "코드1",
      "type": "n8n-nodes-base.code",
      "position": [
        3400,
        1280
      ],
      "parameters": {
        "jsCode": "let dontExist = true;\n\n// Get reference domain from 'Loop over URLs' node\nconst referenceUrl = $('Loop over URLs').first().json.url;\nconst referenceDomain = referenceUrl.match(/^https?:\\/\\/([^\\/?#]+)(?:[\\/?#]|$)/i)?.[1]?.toLowerCase();\n\nif (!referenceDomain) {\n  throw new Error('Invalid reference URL');\n}\n\n// Loop over input items\nfor (const item of $input.all()) {\n  const urls = item.json.website_url;\n\n  for (const url of urls) {\n    const domain = url.match(/^https?:\\/\\/([^\\/?#]+)(?:[\\/?#]|$)/i)?.[1]?.toLowerCase();\n    if (!domain) continue;\n\n    if (domain === referenceDomain) {\n      dontExist = false;\n      break;\n    }\n  }\n\n  if (!dontExist) break;\n}\n\n// Return result\nreturn {\n  json: {\n    dontExist\n  }\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "0273b1f4-5912-41fd-9899-3ec0a5a24f6c",
      "name": "집계1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3160,
        1280
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "website_url"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2adf371b-2b7b-4ce9-9666-95a4b892a963",
      "name": "스티커 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        240
      ],
      "parameters": {
        "width": 680,
        "height": 2220,
        "content": "\n### Overview\n\nThis workflow automates the discovery, extraction, enrichment, and storage of business information from **Google Maps** search queries using AI tools, scrapers, and Google Sheets.\n\nIt is ideal for:\n\n* Lead generation agencies\n* Local business researchers\n* Digital marketing firms\n* Automation & outreach specialists\n\n---\n\n### 🔧 Tools & APIs Used\n\n* **Google Maps Search (via HTTP)**\n* **Custom JavaScript Parsing**\n* **URL Filtering & De-duplication**\n* **Google Sheets (Read/Write)**\n* **APIFY Actor** for business scraping\n* **LangChain AI Agent** (OpenRouter - Gemini 2.5)\n* **n8n Built-in Logic** (Loops, Conditions, Aggregators)\n\n---\n\n### 🧠 Workflow Summary\n\n1. **Trigger**\n   The automation starts via schedule (every hour).\n\n2. **Read Queries from Google Sheet**\n   Loads unprocessed keywords from a Google Sheet tab named `keywords`.\n\n3. **Loop Through Keywords**\n   Each keyword is used to search Google Maps for relevant businesses.\n\n4. **Extract URLs**\n   JavaScript parses HTML to find all external website URLs from the search results.\n\n5. **Clean URLs**\n   Filters out irrelevant domains (e.g., Google-owned, example.com, etc.), and removes duplicates.\n\n6. **Loop Through URLs**\n   For each URL:\n\n   * Checks if it already exists in the Google Sheet (to prevent duplication).\n   * Calls the **APIFY Actor** to extract full business data.\n   * Optionally uses **AI Agent (Gemini)** to provide detailed insight on the business, including:\n\n     * Services, About, Market Position, Weaknesses, AI suggestions, etc.\n   * Converts the AI result (text) to a structured JSON object.\n\n7. **Save to Google Sheet**\n   Adds all extracted and AI-enriched business information to a separate tab (`Sheet1`).\n\n8. **Mark Queries as Processed**\n   Updates the original row in `keywords` to avoid reprocessing.\n\n---\n\n### 🗃️ Output Fields Saved\n\nThe following information is saved per business:\n\n* Business Name, Website, Email, Phone\n* Address, City, Postal Code, Country, Coordinates\n* Category, Subcategory, Services\n* About Us, Opening Hours, Social Media Links\n* Legal Links (Privacy, Terms)\n* Logo, Languages, Keywords\n* **AI-Generated Description**\n* Google Maps URL\n\n---\n\n### 📈 Use Cases\n\n* Build a **prospect database** for B2B cold outreach.\n* Extract **local SEO insights** per business.\n* Feed CRMs or analytics systems with **enriched business profiles**.\n* Automate market research for **regional opportunity detection**.\n\n---\n\n### 📩 Want a Similar Workflow?\n\nIf you’d like a custom AI-powered automation like this for your business or agency, feel free to contact me:\n\n**📧 [msaidwolfltd@gmail.com](mailto:msaidwolfltd@gmail.com)**\n\n\n\n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {
    "Starts scraper workflow": [
      {
        "query": "restaurant+paris"
      }
    ]
  },
  "connections": {
    "a996171f-c358-471d-91ba-b6c9950e7edf": {
      "main": [
        [
          {
            "node": "40ec6d1f-1c98-4c9f-8499-c5893c3df7b9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "12f662a8-c55f-409a-b381-f37ab6dd3794",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "20c5612b-8fbf-4eb4-8f95-ca17acc5f0e2": {
      "main": [
        [
          {
            "node": "9fa06f2a-0e7a-43e1-b997-4b4288a990cd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d2380d4e-20a5-48bb-9d87-3f2c638f2fc7": {
      "main": [
        [
          {
            "node": "4575083d-5d45-497e-a5d1-5c369f2d7b91",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "4575083d-5d45-497e-a5d1-5c369f2d7b91": {
      "main": [
        [
          {
            "node": "a996171f-c358-471d-91ba-b6c9950e7edf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9fa06f2a-0e7a-43e1-b997-4b4288a990cd": {
      "main": [
        [
          {
            "node": "73814b4e-ab19-4a06-b180-a2997e43bdbd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "53d2251a-f7bb-43b1-8035-c7ac74e0aa62": {
      "main": [
        [
          {
            "node": "20c5612b-8fbf-4eb4-8f95-ca17acc5f0e2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "40ec6d1f-1c98-4c9f-8499-c5893c3df7b9": {
      "main": [
        [
          {
            "node": "53d2251a-f7bb-43b1-8035-c7ac74e0aa62",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0273b1f4-5912-41fd-9899-3ec0a5a24f6c": {
      "main": [
        [
          {
            "node": "d2380d4e-20a5-48bb-9d87-3f2c638f2fc7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "12f662a8-c55f-409a-b381-f37ab6dd3794": {
      "main": [
        [],
        [
          {
            "node": "4575083d-5d45-497e-a5d1-5c369f2d7b91",
            "type": "main",
            "index": 0
          },
          {
            "node": "e4997964-dc80-4778-9f79-ae4dc9e41284",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "67dfef97-0fc2-4fa8-a7a8-08c491f8785f": {
      "main": [
        [
          {
            "node": "cb651c6d-eac0-44bc-8d80-c07c5a65ce6a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "985ac7e3-b501-4079-a043-780677c94b52": {
      "main": [
        [],
        [
          {
            "node": "18787007-1d11-41b9-89c3-d5f69756eda7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cb651c6d-eac0-44bc-8d80-c07c5a65ce6a": {
      "main": [
        [
          {
            "node": "985ac7e3-b501-4079-a043-780677c94b52",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "423dce21-e06d-4bd2-833b-976b3ce9e231": {
      "main": [
        [
          {
            "node": "dffaf04e-d1d2-4002-9a69-f0904b61fc2d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e4997964-dc80-4778-9f79-ae4dc9e41284": {
      "main": [
        [
          {
            "node": "0273b1f4-5912-41fd-9899-3ec0a5a24f6c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c191a15f-2457-49c1-976b-90b0caaf3835": {
      "ai_languageModel": [
        [
          {
            "node": "9fa06f2a-0e7a-43e1-b997-4b4288a990cd",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "79df5316-c210-478d-a4de-35b5d31924ee": {
      "main": [
        [
          {
            "node": "12f662a8-c55f-409a-b381-f37ab6dd3794",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a5b67e45-a3f6-41d2-aa58-c26a441c41b2": {
      "main": [
        [
          {
            "node": "79df5316-c210-478d-a4de-35b5d31924ee",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "93437e8b-4f8d-40a1-9585-cab1b556164a": {
      "main": [
        [
          {
            "node": "3a478935-781b-4fb1-bdc7-fcf8be1334bc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dffaf04e-d1d2-4002-9a69-f0904b61fc2d": {
      "main": [
        [
          {
            "node": "985ac7e3-b501-4079-a043-780677c94b52",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "477e7d55-b7d6-4b20-ac44-dd1f443e270a": {
      "main": [
        [
          {
            "node": "a5b67e45-a3f6-41d2-aa58-c26a441c41b2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "18787007-1d11-41b9-89c3-d5f69756eda7": {
      "main": [
        [
          {
            "node": "423dce21-e06d-4bd2-833b-976b3ce9e231",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "54d94ef2-84cf-4568-a9d5-28ec9a818ffd": {
      "main": [
        [
          {
            "node": "12f662a8-c55f-409a-b381-f37ab6dd3794",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3a478935-781b-4fb1-bdc7-fcf8be1334bc": {
      "main": [
        [
          {
            "node": "477e7d55-b7d6-4b20-ac44-dd1f443e270a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "73814b4e-ab19-4a06-b180-a2997e43bdbd": {
      "main": [
        [
          {
            "node": "54d94ef2-84cf-4568-a9d5-28ec9a818ffd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

고급 - 리드 생성, AI 요약

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

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

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

저자
Msaid Mohamed el hadi

Msaid Mohamed el hadi

@mohamedgb00714

Hi! I’m Mohamed El Hadi, a passionate developer and automation expert from Algeria. I specialize in building smart, scalable workflows using n8n to streamline business operations, save time, and drive innovation. 🌍 Open to collaborations | 🤖 Automation lover | 💼 Founder of EcoPetDZ & AADL Auto Reload

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34