Google Sheets, SerpAPI, Apify 및 GPT-4o를 사용하여 현지 기업 연락처 추출
이것은Lead Generation, AI Summarization분야의자동화 워크플로우로, 18개의 노드를 포함합니다.주로 Code, Filter, Summarize, SerpApi, HttpRequest 등의 노드를 사용하며. Google Sheets, SerpAPI, Apify, GPT-4o를 사용하여 현지 기업 연락처를 추출
- •대상 API의 인증 정보가 필요할 수 있음
- •Google Sheets API 인증 정보
- •OpenAI API Key
사용된 노드 (18)
{
"meta": {
"instanceId": "efb474b59b0341d7791932605bd9ff04a6c7ed9941fdd53dc4a2e4b99a6f9439"
},
"nodes": [
{
"id": "0377cde7-39de-4a27-9f57-2ac62ecae89c",
"name": "'워크플로 실행' 클릭 시",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-2520,
400
],
"parameters": {},
"typeVersion": 1
},
{
"id": "ac9d9f3b-db6c-4491-a1ce-ebfff9652ea3",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-700,
780
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "ghJTvay8CvwXDsXz",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "a05ec908-7476-49ec-9b32-3355cec11dce",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-580,
780
],
"parameters": {
"jsonSchemaExample": "{\n\t\"email\": \"emailaddress\"\n}"
},
"typeVersion": 1.2
},
{
"id": "f6bbdf13-a0c1-4d9e-9157-c1a55a06e16b",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"onError": "continueRegularOutput",
"position": [
-1160,
260
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "2003373e-cb00-4c74-b0bf-7ddb677ddb96",
"name": "Execute Workflow",
"type": "n8n-nodes-base.executeWorkflow",
"onError": "continueRegularOutput",
"position": [
-640,
200
],
"parameters": {
"options": {
"waitForSubWorkflow": false
},
"workflowId": {
"__rl": true,
"mode": "list",
"value": "SDMXLfMXOQ6TDfKq",
"cachedResultName": "Email Extraction Project"
},
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
}
},
"typeVersion": 1.2
},
{
"id": "17c39dd5-5c44-4b95-ad50-591224d5517c",
"name": "검색어 추출",
"type": "n8n-nodes-base.googleSheets",
"position": [
-2300,
400
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nwgaTyp239ErzFS0IaDnJca-6LkIqvshmiHHs5bX77o/edit#gid=0",
"cachedResultName": "Searches"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1nwgaTyp239ErzFS0IaDnJca-6LkIqvshmiHHs5bX77o",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nwgaTyp239ErzFS0IaDnJca-6LkIqvshmiHHs5bX77o/edit?usp=drivesdk",
"cachedResultName": "Searches&Results"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "WsgMg14OYooIdvn7",
"name": "Google Sheets account"
}
},
"executeOnce": true,
"typeVersion": 4.6
},
{
"id": "4222fa4d-d0e0-4e91-90bf-dead1424ed2c",
"name": "미처리 행 유지",
"type": "n8n-nodes-base.filter",
"position": [
-2080,
400
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c295c5ea-1ec4-4c9f-bf12-f4c23c60543f",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.Complete }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "4de8ae34-2fea-4169-ada9-80cad9ee2e87",
"name": "첫 번째 행으로 필터링",
"type": "n8n-nodes-base.code",
"position": [
-1860,
400
],
"parameters": {
"jsCode": "return [items[0]];"
},
"typeVersion": 2
},
{
"id": "af38c3a1-1414-4dcf-932d-e4a1db059a91",
"name": "행을 완료로 표시",
"type": "n8n-nodes-base.googleSheets",
"position": [
-1640,
300
],
"parameters": {
"columns": {
"value": {
"Search": "={{ $json.Search }}",
"Complete": "Yes"
},
"schema": [
{
"id": "Search",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Search",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Area",
"type": "string",
"display": true,
"required": false,
"displayName": "Area",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Area Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Area Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Complete",
"type": "string",
"display": true,
"required": false,
"displayName": "Complete",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Search"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nwgaTyp239ErzFS0IaDnJca-6LkIqvshmiHHs5bX77o/edit#gid=0",
"cachedResultName": "Searches"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1nwgaTyp239ErzFS0IaDnJca-6LkIqvshmiHHs5bX77o",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nwgaTyp239ErzFS0IaDnJca-6LkIqvshmiHHs5bX77o/edit?usp=drivesdk",
"cachedResultName": "Searches&Results"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "WsgMg14OYooIdvn7",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "e0087b09-f158-4ce8-bb74-ce45b5d9dfa6",
"name": "Google Maps 검색",
"type": "n8n-nodes-serpapi.serpApi",
"onError": "continueRegularOutput",
"position": [
-1640,
500
],
"parameters": {
"q": "={{ $json.Search }}",
"ll": "={{ $json.Area }}",
"operation": "google_maps",
"requestOptions": {},
"additionalFields": {}
},
"credentials": {
"serpApi": {
"id": "u6KGxSGJbtJANls7",
"name": "SerpAPI account"
}
},
"typeVersion": 1
},
{
"id": "fc558eef-8092-42f7-ab51-41c7002cb50b",
"name": "출력을 테이블로 형식화",
"type": "n8n-nodes-base.code",
"onError": "continueRegularOutput",
"position": [
-1420,
500
],
"parameters": {
"jsCode": "const results = items[0].json.local_results || [];\n\nconst parsedResults = results.map(entry => {\n // Remove \"/url?q=\" if present in the website\n let cleanWebsite = entry.website || null;\n if (cleanWebsite && cleanWebsite.startsWith(\"/url?q=\")) {\n cleanWebsite = cleanWebsite.replace(\"/url?q=\", \"\").split(\"&\")[0];\n }\n\n return {\n title: entry.title || null,\n website: cleanWebsite,\n address: entry.address || null,\n phone: entry.phone || null,\n };\n});\n\n// Return each result as a separate item\nreturn parsedResults.map(result => ({ json: result }));\n"
},
"typeVersion": 2
},
{
"id": "2d3fa5a3-f338-4eb8-be95-c915ce3f189a",
"name": "이메일을 시트에 저장",
"type": "n8n-nodes-base.googleSheets",
"onError": "continueRegularOutput",
"position": [
-940,
0
],
"parameters": {
"columns": {
"value": {
"Area": "={{ $('Extract Search Terms').item.json.Area }}",
"phone": "={{ $('Format output as table').item.json.phone }}",
"title": "={{ $('Format output as table').item.json.title }}",
"Search": "={{ $('Extract Search Terms').item.json.Search }}",
"address": "={{ $('Format output as table').item.json.address }}",
"website": "={{ $('Format output as table').item.json.website }}",
"Search Name": "={{ $('Extract Search Terms').item.json['Area Name'] }}",
"email (Manual Entry)": "={{ $json.output.email }}"
},
"schema": [
{
"id": "title",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "website",
"type": "string",
"display": true,
"required": false,
"displayName": "website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "address",
"type": "string",
"display": true,
"required": false,
"displayName": "address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone",
"type": "string",
"display": true,
"required": false,
"displayName": "phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Search",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Search",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Search Name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Search Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Area",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Area",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email (Manual Entry)",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "email (Manual Entry)",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"title"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1470668196,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nwgaTyp239ErzFS0IaDnJca-6LkIqvshmiHHs5bX77o/edit#gid=1470668196",
"cachedResultName": "Results"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1nwgaTyp239ErzFS0IaDnJca-6LkIqvshmiHHs5bX77o",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nwgaTyp239ErzFS0IaDnJca-6LkIqvshmiHHs5bX77o/edit?usp=drivesdk",
"cachedResultName": "Searches&Results"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "WsgMg14OYooIdvn7",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "947fad74-dd81-4993-947e-a1e9264c1056",
"name": "웹 페이지 스크레이핑",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
-940,
400
],
"parameters": {
"url": "=https://api.apify.com/v2/acts/6sigmag~fast-website-content-crawler/run-sync-get-dataset-items\n",
"method": "POST",
"options": {},
"jsonBody": "={\n \"startUrls\": [\n \"{{ $json.website }}\"\n ]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "yLUXsSPePLOGnHmf",
"name": "Query Auth account"
}
},
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "eaab5179-b3a7-4c94-b2b9-0db29509573f",
"name": "이메일 추출 - AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"onError": "continueRegularOutput",
"position": [
-720,
560
],
"parameters": {
"text": "={{ $json.text }}",
"options": {
"systemMessage": "extract the email address from the text. if there is no email address, output null. "
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "4a9f36d4-fd8b-409c-a1af-6be7248ed671",
"name": "1행으로 축소",
"type": "n8n-nodes-base.summarize",
"onError": "continueRegularOutput",
"position": [
-940,
200
],
"parameters": {
"options": {},
"fieldsToSummarize": {
"values": [
{
"field": "title"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "0fa2b9a4-3e33-4830-86a5-5466f4b9ab1a",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2380,
20
],
"parameters": {
"width": 980,
"content": "## n8n Workflow: Local Business Contact Finder with Email Extraction\n\n** Feel free to contact me if you need help implementing (rbreen@ynteractive.com) **"
},
"typeVersion": 1
},
{
"id": "72de7718-1d85-47e4-ab0b-5e559323f6d4",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3360,
-80
],
"parameters": {
"width": 780,
"height": 1160,
"content": "## How to Implement This n8n Workflow\n\nFollow the steps below to get this business contact finder workflow up and running in your own environment:\n\n1. Copy the Google Sheet\nMake a copy of the search input/output sheet to your own Google Drive:\n\n👉 https://docs.google.com/spreadsheets/d/1QgcVMlXRlM_5ZFFUHr6bVK-93Tzia9XseTX03ZYnowI/edit?usp=sharing\n\n2. Update the Google Sheets Nodes\nOpen the workflow in n8n.\n\nUpdate both Google Sheets nodes (\"Extract Search Terms\" and \"Save Emails to Sheet\") to point to your copied sheet.\n\nMake sure you select the correct sheet/tab names (Searches and Results).\n\nConnect your Google account using the Google Sheets OAuth2 credentials.\n\n3. Get a SerpAPI Key\nSign up for a free trial at 👉 https://serpapi.com/dashboard\n\nCopy your API key.\n\nIn the “Search Google Maps” node:\n\nClick on credentials.\n\nAdd a new SerpAPI credential using your API key.\n\n4. Set Up Apify Crawler\nSign up for an Apify account at 👉 https://apify.com\n\nGo to the Actors section and add Fast Website Content Crawler to your account.\n\nIn the \"Scrape Web Page\" HTTP node:\n\nUnder credentials, enter your Apify API key as a query string parameter (token=YOUR_API_KEY).\n\n5. Add Your OpenAI Key\nSign up at 👉 https://platform.openai.com/\n\nGo to API keys and copy your secret key.\n\nIn the \"AI Agent\" (LangChain node) and \"OpenAI Chat Model\" nodes:\n\nAdd your OpenAI key under the OpenAI credentials section.\n\n✅ Once Complete:\nClick \"Execute Workflow\" to run the automation. The script will:\n\nRead a search + location from your Google Sheet.\n\nPull business info from Google Maps.\n\nVisit each business’s website and scrape its content.\n\nUse AI to extract an email address if available.\n\nSave the full results into the \"Results\" tab and mark the search as complete.\n\n"
},
"typeVersion": 1
},
{
"id": "c771ab3b-428f-46d9-be51-6ea1ce2a3659",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2560,
-80
],
"parameters": {
"color": 5,
"width": 2260,
"height": 1160,
"content": ""
},
"typeVersion": 1
}
],
"pinData": {
"When clicking ‘Execute workflow’": [
{}
]
},
"connections": {
"f6bbdf13-a0c1-4d9e-9157-c1a55a06e16b": {
"main": [
[
{
"node": "2d3fa5a3-f338-4eb8-be95-c915ce3f189a",
"type": "main",
"index": 0
},
{
"node": "4a9f36d4-fd8b-409c-a1af-6be7248ed671",
"type": "main",
"index": 0
}
],
[
{
"node": "947fad74-dd81-4993-947e-a1e9264c1056",
"type": "main",
"index": 0
}
]
]
},
"4a9f36d4-fd8b-409c-a1af-6be7248ed671": {
"main": [
[
{
"node": "2003373e-cb00-4c74-b0bf-7ddb677ddb96",
"type": "main",
"index": 0
}
]
]
},
"947fad74-dd81-4993-947e-a1e9264c1056": {
"main": [
[
{
"node": "eaab5179-b3a7-4c94-b2b9-0db29509573f",
"type": "main",
"index": 0
}
]
]
},
"ac9d9f3b-db6c-4491-a1ce-ebfff9652ea3": {
"ai_languageModel": [
[
{
"node": "eaab5179-b3a7-4c94-b2b9-0db29509573f",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"e0087b09-f158-4ce8-bb74-ce45b5d9dfa6": {
"main": [
[
{
"node": "fc558eef-8092-42f7-ab51-41c7002cb50b",
"type": "main",
"index": 0
}
]
]
},
"4de8ae34-2fea-4169-ada9-80cad9ee2e87": {
"main": [
[
{
"node": "af38c3a1-1414-4dcf-932d-e4a1db059a91",
"type": "main",
"index": 0
},
{
"node": "e0087b09-f158-4ce8-bb74-ce45b5d9dfa6",
"type": "main",
"index": 0
}
]
]
},
"17c39dd5-5c44-4b95-ad50-591224d5517c": {
"main": [
[
{
"node": "4222fa4d-d0e0-4e91-90bf-dead1424ed2c",
"type": "main",
"index": 0
}
]
]
},
"4222fa4d-d0e0-4e91-90bf-dead1424ed2c": {
"main": [
[
{
"node": "4de8ae34-2fea-4169-ada9-80cad9ee2e87",
"type": "main",
"index": 0
}
]
]
},
"fc558eef-8092-42f7-ab51-41c7002cb50b": {
"main": [
[
{
"node": "f6bbdf13-a0c1-4d9e-9157-c1a55a06e16b",
"type": "main",
"index": 0
}
]
]
},
"eaab5179-b3a7-4c94-b2b9-0db29509573f": {
"main": [
[
{
"node": "f6bbdf13-a0c1-4d9e-9157-c1a55a06e16b",
"type": "main",
"index": 0
}
]
]
},
"a05ec908-7476-49ec-9b32-3355cec11dce": {
"ai_outputParser": [
[
{
"node": "eaab5179-b3a7-4c94-b2b9-0db29509573f",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"0377cde7-39de-4a27-9f57-2ac62ecae89c": {
"main": [
[
{
"node": "17c39dd5-5c44-4b95-ad50-591224d5517c",
"type": "main",
"index": 0
}
]
]
}
}
}이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
고급 - 리드 생성, AI 요약
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
Robert Breen
@rbreenProfessional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.
이 워크플로우 공유