초보자 데이터 분석: GPT-4o를 사용하여 Google Sheets에서 결합, 필터링, 요약
이것은Document Extraction, AI Summarization분야의자동화 워크플로우로, 21개의 노드를 포함합니다.주로 If, Set, Code, Merge, Filter 등의 노드를 사용하며. 시작자 데이터 분석: GPT-4o를 사용하여 Google Sheets에서 결합, 필터링 및 요약
- •Google Sheets API 인증 정보
- •OpenAI API Key
사용된 노드 (21)
{
"meta": {
"instanceId": "efb474b59b0341d7791932605bd9ff04a6c7ed9941fdd53dc4a2e4b99a6f9439",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "a241764c-eb51-4d7a-b5d4-3aa517a9195f",
"name": "Google Sheets1",
"type": "n8n-nodes-base.googleSheets",
"position": [
-160,
280
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 173686600,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19aUQYZq02qHsCelO4eeV4sx_MTJJupC5qe0gDLQBtRA/edit#gid=173686600",
"cachedResultName": "Sheet2"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "19aUQYZq02qHsCelO4eeV4sx_MTJJupC5qe0gDLQBtRA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19aUQYZq02qHsCelO4eeV4sx_MTJJupC5qe0gDLQBtRA/edit?usp=drivesdk",
"cachedResultName": "Sample Marketing Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "WsgMg14OYooIdvn7",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "d7b9ee1a-f87d-42f6-b480-8ee687612f33",
"name": "필터",
"type": "n8n-nodes-base.filter",
"position": [
340,
120
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "65acf956-5912-4070-8896-923b74548a5e",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.Clicks }}",
"rightValue": 5
}
]
}
},
"typeVersion": 2.2
},
{
"id": "872dd275-ca9a-4d30-8ac1-e1e921f5e6fd",
"name": "에이전트를 위해 테이블명과 열을 단일 텍스트로 변환",
"type": "n8n-nodes-base.code",
"position": [
1380,
280
],
"parameters": {
"jsCode": "return [\n {\n json: {\n text: items.map(item => JSON.stringify(item.json)).join('\\n'),\n },\n },\n];\n"
},
"typeVersion": 2
},
{
"id": "4b8595d1-d975-49f6-bff0-265aef52042f",
"name": "OpenAI 채팅 모델",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1620,
500
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "ghJTvay8CvwXDsXz",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "c83d8a13-b2da-42f5-b137-763fa06e22e4",
"name": "구조화된 출력 파서",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1800,
500
],
"parameters": {
"jsonSchemaExample": "{\n\t\"paragraph\": \"full paragraph\"\n}"
},
"typeVersion": 1.2
},
{
"id": "c1ad3e75-1964-4f3b-b60c-a9531f8770f7",
"name": "스티커 노트",
"type": "n8n-nodes-base.stickyNote",
"position": [
-440,
-200
],
"parameters": {
"width": 700,
"height": 880,
"content": "### 📌 Merge Multiple Datasets\n\nPull two Google Sheets:\n\n- **Marketing data** (performance metrics) \n- **Leader assignment** (who manages each channel)\n\nThen merge the two sheets based on the **Channel** field.\n\n---\n"
},
"typeVersion": 1
},
{
"id": "9de427fa-c2e0-4de0-8e7b-35d4566f3d6e",
"name": "스티커 노트1",
"type": "n8n-nodes-base.stickyNote",
"position": [
280,
-200
],
"parameters": {
"color": 5,
"width": 380,
"height": 880,
"content": "\n### 📌 Filter and If Steps\n\n**Step 1:** Filter records with **Clicks ≥ 5** \n**Step 2:** Branch logic:\n\n- If **Spend ≥ 350** → `\"Great\"` outcome \n- Else → `\"Poor\"` outcome\n\n---"
},
"typeVersion": 1
},
{
"id": "8aa28836-07db-42f7-b2da-0b2e656e92c7",
"name": "스티커 노트2",
"type": "n8n-nodes-base.stickyNote",
"position": [
680,
-200
],
"parameters": {
"color": 3,
"width": 380,
"height": 880,
"content": "### 📌 Summarize and Set Steps\n\nFor each branch (**Great** / **Poor**):\n\n- Count the number of rows per **Leader** \n- Assign outcome labels \n- Prepare fields like `Leader`, `Outcome`, and `Day count`\n\n---"
},
"typeVersion": 1
},
{
"id": "1fb89d3c-a10e-490d-998a-42436a1d05d0",
"name": "스티커 노트3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1100,
-200
],
"parameters": {
"color": 2,
"width": 860,
"height": 880,
"content": "### 📌 Analyze Results with an AI Agent\n\n- Merge both sets of labeled outcomes \n- Convert to a readable text format \n- Use an **AI Agent** to summarize and compare performance of leaders \n- Output a **paragraph** that identifies the **best** and **worst** performers and **why**"
},
"typeVersion": 1
},
{
"id": "02854b46-8baf-438e-b110-92ce4e96dd6b",
"name": "샘플 마케팅 데이터",
"type": "n8n-nodes-base.googleSheets",
"position": [
-160,
80
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19aUQYZq02qHsCelO4eeV4sx_MTJJupC5qe0gDLQBtRA/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "19aUQYZq02qHsCelO4eeV4sx_MTJJupC5qe0gDLQBtRA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19aUQYZq02qHsCelO4eeV4sx_MTJJupC5qe0gDLQBtRA/edit?usp=drivesdk",
"cachedResultName": "Sample Marketing Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "WsgMg14OYooIdvn7",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "cf5b6397-fe1a-46db-928a-5903507ef424",
"name": "워크플로우 시작",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-380,
180
],
"parameters": {},
"typeVersion": 1
},
{
"id": "58039c62-8b23-4114-9e86-5502c82719ee",
"name": "채널 필드 기준 병합",
"type": "n8n-nodes-base.merge",
"position": [
60,
180
],
"parameters": {
"mode": "combine",
"options": {},
"fieldsToMatchString": "Channel"
},
"typeVersion": 3.2
},
{
"id": "7ed757ca-05b7-41af-9f70-f88b9aba4981",
"name": "$350 이상 지출 확인",
"type": "n8n-nodes-base.if",
"position": [
460,
340
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c0cba05b-63ba-420e-851a-caf2bf9b9914",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json['Spend ($)'] }}",
"rightValue": 350
}
]
}
},
"typeVersion": 2.2
},
{
"id": "73aeb996-58d7-4492-a948-bc6f9f92cb46",
"name": "불량 일수 계산",
"type": "n8n-nodes-base.summarize",
"position": [
740,
100
],
"parameters": {
"options": {},
"fieldsToSplitBy": "Leader",
"fieldsToSummarize": {
"values": [
{
"field": "row_number"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "af21446e-d779-4937-bee4-d650dccd8f32",
"name": "양호 일수 계산",
"type": "n8n-nodes-base.summarize",
"position": [
760,
300
],
"parameters": {
"options": {},
"fieldsToSplitBy": "Leader",
"fieldsToSummarize": {
"values": [
{
"field": "row_number"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "9b6bb3eb-aae2-4317-8551-78fb81312765",
"name": "필드를 테이블로 구성",
"type": "n8n-nodes-base.set",
"position": [
920,
120
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "e2f52c05-13a5-4692-bbea-87642535145e",
"name": "Outcome",
"type": "string",
"value": "Poor"
},
{
"id": "8c353e0a-409f-4cff-a1b9-17259cc3a1dd",
"name": "# of Days",
"type": "number",
"value": "={{ $json.count_row_number }}"
},
{
"id": "82d2f8dd-54b8-42c8-b502-6ae1fc76e1fe",
"name": "Leader",
"type": "string",
"value": "={{ $json.Leader }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "b5780191-2068-4595-b18c-16626003145d",
"name": "두 번째 데이터를 테이블로 구성",
"type": "n8n-nodes-base.set",
"position": [
920,
320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f3f79a06-acb9-4b89-a7ab-438358b4395e",
"name": "Outcome",
"type": "string",
"value": "Great"
},
{
"id": "e79913fa-a2ec-459c-a00d-df23bb1a2a25",
"name": "# of Days",
"type": "number",
"value": "={{ $json.count_row_number }}"
},
{
"id": "a6b563e3-0776-4916-a9f3-05d38a67330a",
"name": "Leader",
"type": "string",
"value": "={{ $json.Leader }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "097dc227-3999-427c-9900-008845b00131",
"name": "데이터소스 함께 추가",
"type": "n8n-nodes-base.merge",
"position": [
1180,
220
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "1ec5183b-be3f-447a-b312-56420ac5c706",
"name": "AI 에이전트 - 리더 성과 요약",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1600,
180
],
"parameters": {
"text": "={{ $json.text }}",
"options": {
"systemMessage": "You are given a list of outcomes by leader. write a summary of the outcomes and identify who is doing the best and worst, and why. \n\noutput as one paragraph. \n\nOutput like this. \n\n{\n\t\"paragraph\": \"full paragraph\"\n}"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "0a53ca1a-53f0-4d68-b70f-e5fff251af5f",
"name": "스티커 노트4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-440,
-400
],
"parameters": {
"color": 4,
"width": 1100,
"content": "### 📌 Setup Instructions\n\nBefore running the workflow:\n\n1. **Copy the sample Google Sheet** \n [Click here to copy the Google Sheet](https://docs.google.com/spreadsheets/d/19aUQYZq02qHsCelO4eeV4sx_MTJJupC5qe0gDLQBtRA/copy)\n\n2. **Connect Google Sheets API** \n - In n8n, go to **Credentials** and create a **Google Sheets OAuth2** credential.\n - Make sure to authorize access to the copied spreadsheet.\n\n3. **Add your OpenAI API Key** \n - In the **AI Agent** step, connect your **OpenAI credential** using your API key.\n\n---"
},
"typeVersion": 1
},
{
"id": "4dffd2eb-9a06-4103-97a5-47aeccdca95c",
"name": "스티커 노트5",
"type": "n8n-nodes-base.stickyNote",
"position": [
680,
-400
],
"parameters": {
"color": 2,
"width": 1280,
"content": "### 👋 Questions or Feedback?\nFeel free to reach out — I’m happy to help!\n**Robert Breen** \nFounder, Ynteractive \n🌐 [ynteractive.com](https://ynteractive.com) \n📧 robert@ynteractive.com \n🔗 [LinkedIn: linkedin.com/in/robertbreen](https://www.linkedin.com/in/robertbreen)"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"d7b9ee1a-f87d-42f6-b480-8ee687612f33": {
"main": [
[
{
"node": "7ed757ca-05b7-41af-9f70-f88b9aba4981",
"type": "main",
"index": 0
}
]
]
},
"73aeb996-58d7-4492-a948-bc6f9f92cb46": {
"main": [
[
{
"node": "9b6bb3eb-aae2-4317-8551-78fb81312765",
"type": "main",
"index": 0
}
]
]
},
"a241764c-eb51-4d7a-b5d4-3aa517a9195f": {
"main": [
[
{
"node": "58039c62-8b23-4114-9e86-5502c82719ee",
"type": "main",
"index": 1
}
]
]
},
"cf5b6397-fe1a-46db-928a-5903507ef424": {
"main": [
[
{
"node": "02854b46-8baf-438e-b110-92ce4e96dd6b",
"type": "main",
"index": 0
},
{
"node": "a241764c-eb51-4d7a-b5d4-3aa517a9195f",
"type": "main",
"index": 0
}
]
]
},
"af21446e-d779-4937-bee4-d650dccd8f32": {
"main": [
[
{
"node": "b5780191-2068-4595-b18c-16626003145d",
"type": "main",
"index": 0
}
]
]
},
"4b8595d1-d975-49f6-bff0-265aef52042f": {
"ai_languageModel": [
[
{
"node": "1ec5183b-be3f-447a-b312-56420ac5c706",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"02854b46-8baf-438e-b110-92ce4e96dd6b": {
"main": [
[
{
"node": "58039c62-8b23-4114-9e86-5502c82719ee",
"type": "main",
"index": 0
}
]
]
},
"58039c62-8b23-4114-9e86-5502c82719ee": {
"main": [
[
{
"node": "d7b9ee1a-f87d-42f6-b480-8ee687612f33",
"type": "main",
"index": 0
}
]
]
},
"7ed757ca-05b7-41af-9f70-f88b9aba4981": {
"main": [
[
{
"node": "73aeb996-58d7-4492-a948-bc6f9f92cb46",
"type": "main",
"index": 0
}
],
[
{
"node": "af21446e-d779-4937-bee4-d650dccd8f32",
"type": "main",
"index": 0
}
]
]
},
"c83d8a13-b2da-42f5-b137-763fa06e22e4": {
"ai_outputParser": [
[
{
"node": "1ec5183b-be3f-447a-b312-56420ac5c706",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"9b6bb3eb-aae2-4317-8551-78fb81312765": {
"main": [
[
{
"node": "097dc227-3999-427c-9900-008845b00131",
"type": "main",
"index": 0
}
]
]
},
"097dc227-3999-427c-9900-008845b00131": {
"main": [
[
{
"node": "872dd275-ca9a-4d30-8ac1-e1e921f5e6fd",
"type": "main",
"index": 0
}
]
]
},
"b5780191-2068-4595-b18c-16626003145d": {
"main": [
[
{
"node": "097dc227-3999-427c-9900-008845b00131",
"type": "main",
"index": 1
}
]
]
},
"1ec5183b-be3f-447a-b312-56420ac5c706": {
"main": [
[]
]
},
"872dd275-ca9a-4d30-8ac1-e1e921f5e6fd": {
"main": [
[
{
"node": "1ec5183b-be3f-447a-b312-56420ac5c706",
"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.
이 워크플로우 공유