OpenAI, Google 스프레드시트 및 AI 에이전트를 사용하여 Gmail 문의 자동 응답
이것은Support, AI분야의자동화 워크플로우로, 14개의 노드를 포함합니다.주로 Gmail, GmailTrigger, GoogleSheets, Agent, GoogleSheetsTool 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. OpenAI, Google 스프레드시트 및 AI 에이전트를 사용하여 Gmail 문의 자동 응답
- •Google 계정 및 Gmail API 인증 정보
- •Google Sheets API 인증 정보
- •OpenAI API Key
사용된 노드 (14)
{
"meta": {
"instanceId": "d1786ab0d745a7498abf13a9c2cdabb1374c006e889b79eef64ce0386b8f8a41",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "e0d9ee42-e519-41ef-b11a-0c45f7e7a78e",
"name": "OpenAI 채팅 모델",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
280,
180
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "MGwGMKEkdcjzlYCw",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "a0d9e3a0-52d9-4edc-9806-991c1aeb14a3",
"name": "OpenAI 채팅 모델1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
620,
200
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "MGwGMKEkdcjzlYCw",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "40ba7c6e-5854-4313-b695-9ed86c4c8e80",
"name": "구조화된 출력 파서",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
820,
200
],
"parameters": {
"jsonSchemaExample": "{\n \"respond\": \"Hi!\\nThank you for reaching out.\\nRefunds can be requested within 30 days of purchase.\\nOur pricing starts at $99/month.\\nIf you have more questions, feel free to reply to this email.\"\n}"
},
"typeVersion": 1.2
},
{
"id": "f7dc1cd8-8c69-450a-b3c9-f7fed3f6ffe1",
"name": "Google 스프레드시트 컨텍스트 검색 도구",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
720,
200
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1bZ7DTp_6-Qs6S7McyIrlMnuCvHbCrgUI-GBjz_eMpHc/edit#gid=0",
"cachedResultName": "FAQ_Context"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1bZ7DTp_6-Qs6S7McyIrlMnuCvHbCrgUI-GBjz_eMpHc",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1bZ7DTp_6-Qs6S7McyIrlMnuCvHbCrgUI-GBjz_eMpHc/edit?usp=drivesdk",
"cachedResultName": "Gmail Auto-Responder – Context & Logs"
},
"descriptionType": "manual",
"toolDescription": "Google Sheet Context Retrieval Tool\nGet Context from Gooogle Sheet"
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ypmzFxQFfAacuVVC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "325816aa-d11a-4d73-80f6-b824423e73ae",
"name": "사용자에게 답변 보내기",
"type": "n8n-nodes-base.gmail",
"position": [
1000,
-20
],
"webhookId": "e676b1f3-9342-4ad0-ac8f-71ec08a27fbc",
"parameters": {
"sendTo": "={{ $('Watch Gmail for New Incoming Emails').item.json.to.value[0].address }}",
"message": "={{ $('Reply Generator AI Agent').item.json.output.respond }}",
"options": {
"appendAttribution": false
},
"subject": "Thanks for Reaching Out – Here’s a Response from Our Team",
"emailType": "text"
},
"credentials": {
"gmailOAuth2": {
"id": "sWl7FFMkEUYBj0zM",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "cc2247c3-2cc6-4c38-9302-555ba124d3e9",
"name": "답변 생성 AI 에이전트",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
660,
-20
],
"parameters": {
"text": "=You are an AI email assistant that helps respond to customer enquiries.\n\nYou are given:\n- A user enquiry (email content)\n- A list of known FAQ context entries from a Google Sheet\n\nYour job is to:\n1. Carefully read the user’s enquiry and identify all individual questions asked.\n2. Check if any of the context entries from the \"Google Sheet Context Retrieval Tool\" to match any of the questions.\n3. Compose ONE complete, friendly, and professional reply that:\n - Answers all the questions that have matching context entries using ONLY the information provided in the context.\n - Politely informs the user that for any unanswered questions, the support team will follow up shortly.\n4. DO NOT make up answers or assume information.\n5. Always include a friendly closing sentence: \n \"If you have more questions, feel free to reply to this email.\"\n\nImportant:\n- Only use information from the FAQ context.\n- Keep your tone professional, friendly, and clear.\n- Make sure the reply is consolidated into a SINGLE email covering all matched and unmatched questions.\n\n---\n\n### INPUTS\n**User Full Name**\n{{ $json.from.value[0].name }}\n\n**User Enquiry (email content):** \n{{ $json.text }}\n\n---\n\n### EXAMPLES\n\n**Example Context:** \n- \"Our pricing starts at $99/month.\" \n- \"We offer a 14-day free trial.\" \n- \"Refunds can be requested within 30 days of purchase.\"\n\n**Example Enquiry:** \n\"Hi **User Full Name**, I want to know if I can get a refund for my purchase and what your pricing is?\"\n\n**Expected Output (in JSON format):**\n\n```json\n{\n \"respond\": \"Hi!\\nThank you for reaching out.\\nRefunds can be requested within 30 days of purchase.\\nOur pricing starts at $99/month.\\nIf you have more questions, feel free to reply to this email.\"\n}\n",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.9
},
{
"id": "02a2e4bd-05e6-4b3b-b2a4-fa02623c5b25",
"name": "새로운 수신 Gmail 이메일 모니터링",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
40,
-20
],
"parameters": {
"simple": false,
"filters": {},
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"gmailOAuth2": {
"id": "sWl7FFMkEUYBj0zM",
"name": "Gmail account"
}
},
"typeVersion": 1.2
},
{
"id": "cfa9d0a9-5e38-43ef-9ce7-ddd86c266ec2",
"name": "Google 스프레드시트에 문의 및 응답 기록",
"type": "n8n-nodes-base.googleSheets",
"position": [
1200,
-20
],
"parameters": {
"columns": {
"value": {
"Timestamp": "={{ $now }}",
"AI Response": "={{ $('Reply Generator AI Agent').item.json.output.reply }}",
"Sender Email": "={{ $('Watch Gmail for New Incoming Emails').item.json.to.value[0].address }}",
"Original Message": "={{ $('Watch Gmail for New Incoming Emails').item.json.text }}"
},
"schema": [
{
"id": "Timestamp",
"type": "string",
"display": true,
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Sender Email",
"type": "string",
"display": true,
"required": false,
"displayName": "Sender Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Subject",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Subject",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Original Message",
"type": "string",
"display": true,
"required": false,
"displayName": "Original Message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Response",
"type": "string",
"display": true,
"required": false,
"displayName": "AI Response",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 419912118,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1bZ7DTp_6-Qs6S7McyIrlMnuCvHbCrgUI-GBjz_eMpHc/edit#gid=419912118",
"cachedResultName": "Enquiry_Log"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1bZ7DTp_6-Qs6S7McyIrlMnuCvHbCrgUI-GBjz_eMpHc",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1bZ7DTp_6-Qs6S7McyIrlMnuCvHbCrgUI-GBjz_eMpHc/edit?usp=drivesdk",
"cachedResultName": "Gmail Auto-Responder – Context & Logs"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ypmzFxQFfAacuVVC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "47816515-d96d-412c-9ff8-4cb9e3aff9ae",
"name": "문의 필터",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
260,
-20
],
"parameters": {
"options": {},
"inputText": "={{ $json.text }}",
"categories": {
"categories": [
{
"category": "Inquiry",
"description": "The message is asking a question, requesting information, or seeking help — such as product details, pricing, support, or usage instructions."
},
{
"category": "Not Inquiry",
"description": "\tThe message is not asking for anything. It could be a newsletter, promotion, auto-reply, confirmation, or unrelated content with no actionable question."
}
]
}
},
"typeVersion": 1
},
{
"id": "fca2b9cf-2427-4482-a1d8-8788b2b26507",
"name": "스티키 노트2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-280,
-140
],
"parameters": {
"color": 4,
"width": 260,
"height": 380,
"content": "## SETUP REQUIRED\n\nGoogle Sheets Structure:\nSheet 1: \"FAQ_Context\"\n• Column A: Context\n\nSheet 2: \"Enquiry_Log\"\n• Column A: Timestamp\n• Column B: Sender Email\n• Column C: Subject\n• Column D: Original Message\n• Column E: AI Response\n\nRequired Credentials:\n• OpenAI API Key\n• Google Sheets Credential\n• Gmail Credential"
},
"typeVersion": 1
},
{
"id": "7326118b-b01e-466e-92ec-b4ea5e77af0d",
"name": "스티키 노트1",
"type": "n8n-nodes-base.stickyNote",
"position": [
580,
-80
],
"parameters": {
"color": 4,
"width": 380,
"height": 520,
"content": "🤖 Reads email and creates intelligent replies"
},
"typeVersion": 1
},
{
"id": "5b256ec0-2b8b-4f24-bf76-8bb489087a25",
"name": "스티키 노트",
"type": "n8n-nodes-base.stickyNote",
"position": [
1140,
-100
],
"parameters": {
"color": 4,
"width": 260,
"height": 280,
"content": "✏️ Records every inquiry and response"
},
"typeVersion": 1
},
{
"id": "27a368f2-abe2-4f3d-ac3e-c433a5512c61",
"name": "스티키 노트3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
300
],
"parameters": {
"color": 5,
"width": 460,
"height": 420,
"content": "## 📧 Smart Gmail Auto-Responder with AI-Powered Customer Support\nWhat This Template Does:\n\n- Automatically monitors your Gmail inbox for new customer inquiries\n- Uses GPT-4 to intelligently classify emails as inquiries vs spam/newsletters\n- Generates contextual, professional responses using your pre-approved FAQ database\n- Only responds to genuine customer questions - ignores automated emails and promotions\n- Logs all interactions to Google Sheets for analysis and continuous improvement\n- Provides 24/7 instant customer support without human intervention"
},
"typeVersion": 1
},
{
"id": "3795025b-4daf-439d-82e4-a4f872fe0ea0",
"name": "스티키 노트4",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
300
],
"parameters": {
"color": 5,
"width": 400,
"height": 340,
"content": "## 📋 WORKFLOW PROCESS OVERVIEW\nStep 1: 📧 Gmail monitors inbox for new incoming emails\nStep 2: 🤖 AI classifies email as genuine inquiry vs spam/newsletter\nStep 3: 🔍 AI analyzes customer questions and searches FAQ database\nStep 4: ✍️ AI generates comprehensive, contextual response using approved answers\nStep 5: 📤 Automated reply sent to customer with professional tone\nStep 6: 📝 Complete interaction logged to Google Sheets for tracking"
},
"typeVersion": 1
}
],
"pinData": {
"Watch Gmail for New Incoming Emails": [
{
"id": "1970bbabb2a1b16a",
"to": {
"html": "<span class=\"mp_address_group\"><span class=\"mp_address_name\">Billy Christi Hartanto</span> <<a href=\"mailto:billychartanto@gmail.com\" class=\"mp_address_email\">billychartanto@gmail.com</a>></span>",
"text": "\"Billy Christi Hartanto\" <billychartanto@gmail.com>",
"value": [
{
"name": "Billy Christi Hartanto",
"address": "billychartanto@gmail.com"
}
]
},
"date": "2025-05-26T08:34:35.000Z",
"from": {
"html": "<span class=\"mp_address_group\"><span class=\"mp_address_name\">Billy Christi Hartanto</span> <<a href=\"mailto:billychartanto@gmail.com\" class=\"mp_address_email\">billychartanto@gmail.com</a>></span>",
"text": "\"Billy Christi Hartanto\" <billychartanto@gmail.com>",
"value": [
{
"name": "Billy Christi Hartanto",
"address": "billychartanto@gmail.com"
}
]
},
"html": "<div dir=\"ltr\">What is your pricing?<br><br>what is your uptime<br><br>what will happen for new user?</div>\n",
"text": "1. Can I try your service before paying? 2. How do I cancel my subscription? 3. I need a refund. How does that work? 4. Where can I download my invoice? 5. What’s included in the Basic Plan? 6. Do you integrate with Google Sheets and Airtable? 7. Is your platform GDPR-compliant? 8. I’m locked out of my account—what should I do? 9. How can I upgrade my current plan? 10. Do you offer support in Indonesian?",
"headers": {
"to": "To: Billy Christi Hartanto <billychartanto@gmail.com>",
"date": "Date: Mon, 26 May 2025 16:34:35 +0800",
"from": "From: Billy Christi Hartanto <billychartanto@gmail.com>",
"subject": "Subject: I want to ask something",
"message-id": "Message-ID: <CAMAvGrJjGkxgDQU+yLWckOVW7JvYGWvQQEDOoXZk6WYoGESVgQ@mail.gmail.com>",
"content-type": "Content-Type: multipart/alternative; boundary=\"0000000000006cd8ca063605d1a4\"",
"mime-version": "MIME-Version: 1.0"
},
"subject": "I want to ask something",
"labelIds": [
"UNREAD",
"IMPORTANT",
"SENT",
"INBOX"
],
"threadId": "1970bba4c2e53c91",
"messageId": "<CAMAvGrJjGkxgDQU+yLWckOVW7JvYGWvQQEDOoXZk6WYoGESVgQ@mail.gmail.com>",
"textAsHtml": "<p>What is your pricing?</p><p>what is your uptime</p><p>what will happen for new user?</p>",
"sizeEstimate": 744
}
]
},
"connections": {
"47816515-d96d-412c-9ff8-4cb9e3aff9ae": {
"main": [
[
{
"node": "cc2247c3-2cc6-4c38-9302-555ba124d3e9",
"type": "main",
"index": 0
}
]
]
},
"e0d9ee42-e519-41ef-b11a-0c45f7e7a78e": {
"ai_languageModel": [
[
{
"node": "47816515-d96d-412c-9ff8-4cb9e3aff9ae",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"a0d9e3a0-52d9-4edc-9806-991c1aeb14a3": {
"ai_languageModel": [
[
{
"node": "cc2247c3-2cc6-4c38-9302-555ba124d3e9",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"325816aa-d11a-4d73-80f6-b824423e73ae": {
"main": [
[
{
"node": "cfa9d0a9-5e38-43ef-9ce7-ddd86c266ec2",
"type": "main",
"index": 0
}
]
]
},
"cc2247c3-2cc6-4c38-9302-555ba124d3e9": {
"main": [
[
{
"node": "325816aa-d11a-4d73-80f6-b824423e73ae",
"type": "main",
"index": 0
}
]
]
},
"40ba7c6e-5854-4313-b695-9ed86c4c8e80": {
"ai_outputParser": [
[
{
"node": "cc2247c3-2cc6-4c38-9302-555ba124d3e9",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"02a2e4bd-05e6-4b3b-b2a4-fa02623c5b25": {
"main": [
[
{
"node": "47816515-d96d-412c-9ff8-4cb9e3aff9ae",
"type": "main",
"index": 0
}
]
]
},
"f7dc1cd8-8c69-450a-b3c9-f7fed3f6ffe1": {
"ai_tool": [
[
{
"node": "cc2247c3-2cc6-4c38-9302-555ba124d3e9",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
중급 - 지원, 인공지능
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
Billy Christi
@billyI'm a professional software engineer and n8n expert with a passion for building scalable, no-code and low-code automation workflows. I specialize in creating seamless integrations between APIs, CRMs, and everyday tools to help businesses save time, reduce manual work, and operate smarter. Whether it's automating marketing pipelines, backend systems, or approval processes, I turn complex logic into simple, powerful workflows with n8n.
이 워크플로우 공유