OpenAI GPT-4 분류 기반 Gmail 메일 자동 분류 및 라벨링
중급
이것은AI Summarization, Multimodal AI분야의자동화 워크플로우로, 15개의 노드를 포함합니다.주로 Gmail, SplitInBatches, ScheduleTrigger, LmChatOpenAi, TextClassifier 등의 노드를 사용하며. OpenAI GPT-4 분류 기반 Gmail 메일 자동 분류 및 라벨링
사전 요구사항
- •Google 계정 및 Gmail API 인증 정보
- •OpenAI API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"meta": {
"instanceId": "d1786ab0d745a7498abf13a9c2cdabb1374c006e889b79eef64ce0386b8f8a41",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "434e0315-d478-4fc6-9d68-b6d83692d56d",
"name": "스케줄 트리거",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-220,
-60
],
"parameters": {
"rule": {
"interval": [
{
"field": "minutes"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "9a3551be-1e97-4b1a-986e-55adb27ea660",
"name": "항목 반복 처리",
"type": "n8n-nodes-base.splitInBatches",
"position": [
220,
-40
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "e44d7114-2e55-4bc3-82d6-b9fdf10651d8",
"name": "OpenAI 채팅 모델",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
440,
180
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5",
"cachedResultName": "gpt-5"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "MGwGMKEkdcjzlYCw",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "123cb1eb-0d71-4e61-a4af-f514c54f20e2",
"name": "라벨 추가 (긴급)",
"type": "n8n-nodes-base.gmail",
"position": [
940,
-200
],
"webhookId": "78527ed1-4494-4a9a-994b-a417a3c45ac1",
"parameters": {
"labelIds": [
"IMPORTANT"
],
"resource": "thread",
"threadId": "={{ $json.threadId }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "CeBpTZBQSAMKVKJY",
"name": "Gmail account (Billy Email 2)"
}
},
"typeVersion": 2.1
},
{
"id": "e1b53e1d-da8d-483d-8fe3-ddc821b66c0e",
"name": "라벨 추가 (개인)",
"type": "n8n-nodes-base.gmail",
"position": [
940,
0
],
"webhookId": "78527ed1-4494-4a9a-994b-a417a3c45ac1",
"parameters": {
"labelIds": [
"CATEGORY_PERSONAL"
],
"resource": "thread",
"threadId": "={{ $json.threadId }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "CeBpTZBQSAMKVKJY",
"name": "Gmail account (Billy Email 2)"
}
},
"typeVersion": 2.1
},
{
"id": "711c5194-4046-42ac-8e2e-acbe2026ac29",
"name": "라벨 추가 (프로모션)",
"type": "n8n-nodes-base.gmail",
"position": [
940,
220
],
"webhookId": "78527ed1-4494-4a9a-994b-a417a3c45ac1",
"parameters": {
"labelIds": [
"CATEGORY_PROMOTIONS"
],
"resource": "thread",
"threadId": "={{ $json.threadId }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "CeBpTZBQSAMKVKJY",
"name": "Gmail account (Billy Email 2)"
}
},
"typeVersion": 2.1
},
{
"id": "ac4c736c-4948-4463-9651-54e1b5e592fa",
"name": "스티커 노트",
"type": "n8n-nodes-base.stickyNote",
"position": [
-680,
-140
],
"parameters": {
"color": 4,
"width": 400,
"height": 300,
"content": "## SETUP REQUIRED\n\nWorkflow Configurations:\n- Update the Text Classifier and adjust the labels based on your use case.\n- Add/Remove the Gmail addLabels node to match your use case.\n\nRequired Credentials:\n- Gmail Credential\n- OpenAI API Key"
},
"typeVersion": 1
},
{
"id": "29a5312e-4ddf-41e7-afff-1e8683feca28",
"name": "스티커 노트1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-680,
500
],
"parameters": {
"color": 4,
"width": 680,
"height": 400,
"content": "## 📋 WORKFLOW PROCESS OVERVIEW\n\nStep 1: ⏰ Schedule Trigger executes the workflow every 5 minutes automatically\nStep 2: 📨 Gmail Fetch retrieves up to 10 recent emails from the last 5 minutes using Gmail API\nStep 3: 🔄 Loop Over Items processes each email individually through a batch splitting mechanism\nStep 4: 🤖 Text Classifier (AI Agent) analyzes email subject and body content using OpenAI to categorize emails\nStep 5: 🏷️ Add Labels applies the appropriate Gmail label based on classification: (below is an example only, adjust to your own use case)\n - High Priority emails → \"IMPORTANT\" label\n - Personal emails → \"CATEGORY_PERSONAL\" label \n - Promotional emails → \"CATEGORY_PROMOTIONS\" label\n\n\nStep 6: ↩️ Loop Back continues processing remaining emails until all are classified and labeled"
},
"typeVersion": 1
},
{
"id": "8825d969-1365-4c33-bc00-e995deb40e64",
"name": "스티커 노트2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-680,
200
],
"parameters": {
"color": 4,
"width": 680,
"height": 280,
"content": "## 📧 Smart Gmail Labeling Automation with Text Classifier and GPT-5\n\nWhat This Template Does:\n\n- Runs every 5 minutes to automatically fetch recent emails from your Gmail inbox\n- Retrieves up to 10 emails received within the last 5 minutes\n- Uses OpenAI's Model to intelligently classify each email into predefined categories\n- Automatically applies appropriate Gmail labels based on AI classification results\n- Organizes your inbox by categorizing emails as High Priority, Personal, or Promotional content\n- Processes emails individually through a batch loop to ensure accurate classification"
},
"typeVersion": 1
},
{
"id": "6ab81542-c082-409a-affd-138e766d42a9",
"name": "스티커 노트4",
"type": "n8n-nodes-base.stickyNote",
"position": [
860,
-380
],
"parameters": {
"color": 4,
"width": 280,
"height": 860,
"content": "## Add Label Nodes\n\nAdd Label Nodes based on your use case. For example, if you have 5 labels, then you can add 5 nodes and adjust the label names on each node.\n"
},
"typeVersion": 1
},
{
"id": "e6ef7d72-00a6-457d-8059-f20dcecc9d9f",
"name": "스티커 노트5",
"type": "n8n-nodes-base.stickyNote",
"position": [
440,
-180
],
"parameters": {
"color": 4,
"width": 320,
"height": 320,
"content": "## Label Classifier\n\nAdjust the categories based on your use case. Also, add a description to each category for maximum results.\n"
},
"typeVersion": 1
},
{
"id": "ce7c17d4-958e-4d77-8b99-07d71b1005a0",
"name": "라벨 분류기",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
460,
0
],
"parameters": {
"options": {
"fallback": "other"
},
"inputText": "=Email Subject:\n{{ $json.headers.subject }}\n\nEmail Body:\n{{ $json.text }}",
"categories": {
"categories": [
{
"category": "High Priority",
"description": "Emails that require immediate attention or urgent action."
},
{
"category": "Personal",
"description": "Personal refers to activities or matters related to private life, self, or non-work interests."
},
{
"category": "Promotions",
"description": "Promotions refer to marketing messages or activities that advertise products, services, or offers"
}
]
}
},
"typeVersion": 1,
"alwaysOutputData": false
},
{
"id": "1c81d787-784f-48bb-bdd2-2b9b2f9fc975",
"name": "스티커 노트6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-120,
-220
],
"parameters": {
"color": 4,
"width": 320,
"height": 320,
"content": "## Gmail - Get Emails\n\nGet all messages received within the last 5 minutes. \nYou can adjust the time range and the email limit here.\n"
},
"typeVersion": 1
},
{
"id": "9482f1e2-d564-4f15-938e-d4db4b1a59cb",
"name": "Gmail - 이메일 가져오기",
"type": "n8n-nodes-base.gmail",
"position": [
-20,
-60
],
"webhookId": "9777ca5f-5226-4fc8-b93b-a3344f890dd3",
"parameters": {
"limit": 10,
"simple": false,
"filters": {
"receivedAfter": "={{ $now.minus({ minutes: 50000 }).toMillis() }}"
},
"options": {},
"operation": "getAll"
},
"credentials": {
"gmailOAuth2": {
"id": "CeBpTZBQSAMKVKJY",
"name": "Gmail account (Billy Email 2)"
}
},
"typeVersion": 2.1
}
],
"pinData": {},
"connections": {
"9a3551be-1e97-4b1a-986e-55adb27ea660": {
"main": [
[],
[
{
"node": "ce7c17d4-958e-4d77-8b99-07d71b1005a0",
"type": "main",
"index": 0
}
]
]
},
"ce7c17d4-958e-4d77-8b99-07d71b1005a0": {
"main": [
[
{
"node": "123cb1eb-0d71-4e61-a4af-f514c54f20e2",
"type": "main",
"index": 0
}
],
[
{
"node": "e1b53e1d-da8d-483d-8fe3-ddc821b66c0e",
"type": "main",
"index": 0
}
],
[
{
"node": "711c5194-4046-42ac-8e2e-acbe2026ac29",
"type": "main",
"index": 0
}
],
[
{
"node": "9a3551be-1e97-4b1a-986e-55adb27ea660",
"type": "main",
"index": 0
}
]
]
},
"434e0315-d478-4fc6-9d68-b6d83692d56d": {
"main": [
[
{
"node": "9482f1e2-d564-4f15-938e-d4db4b1a59cb",
"type": "main",
"index": 0
}
]
]
},
"e44d7114-2e55-4bc3-82d6-b9fdf10651d8": {
"ai_languageModel": [
[
{
"node": "ce7c17d4-958e-4d77-8b99-07d71b1005a0",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"9482f1e2-d564-4f15-938e-d4db4b1a59cb": {
"main": [
[
{
"node": "9a3551be-1e97-4b1a-986e-55adb27ea660",
"type": "main",
"index": 0
}
]
]
},
"e1b53e1d-da8d-483d-8fe3-ddc821b66c0e": {
"main": [
[
{
"node": "9a3551be-1e97-4b1a-986e-55adb27ea660",
"type": "main",
"index": 0
}
]
]
},
"711c5194-4046-42ac-8e2e-acbe2026ac29": {
"main": [
[
{
"node": "9a3551be-1e97-4b1a-986e-55adb27ea660",
"type": "main",
"index": 0
}
]
]
},
"123cb1eb-0d71-4e61-a4af-f514c54f20e2": {
"main": [
[
{
"node": "9a3551be-1e97-4b1a-986e-55adb27ea660",
"type": "main",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
중급 - AI 요약, 멀티모달 AI
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
매일 Jira 작업 요약 생성기 (GPT-5 + Jira API)
GPT-5와 Jira API를 사용한 매일 Jira 작업 요약 생성기
Set
Code
Jira
+
Set
Code
Jira
24 노드Billy Christi
AI 요약
GPT-5 및 양식을 사용한 ClickUp 작업 계층 구조 애자일 프로젝트 생성기
사용GPT-5및表单의ClickUp任务层级敏捷项目생성기
Set
Gmail
Limit
+
Set
Gmail
Limit
28 노드Billy Christi
멀티모달 AI
GPT-5 Mini, Jira 및 양식 인터페이스를 사용한 애자일 프로젝트 설정 자동화
GPT-5 Mini, Jira 및 양식 인터페이스를 사용한 애자일 프로젝트 설정 자동화
Set
Jira
Gmail
+
Set
Jira
Gmail
42 노드Billy Christi
멀티모달 AI
AI를 사용하여 Morning Brew 스타일 Reddit 요약 자동 생성 및 DEV에 게시
AI를 사용한 Morning Brew 스타일 Reddit 요약 자동 생성 및 DEV 게시
If
Set
Wait
+
If
Set
Wait
26 노드Angel Menendez
AI 요약
내 작업 흐름
Gmail 정리: GPT-4 사용하여 비활동 메일 분류 및 아카이브
If
Set
Gmail
+
If
Set
Gmail
13 노드Matt Chong | n8n Creator
AI 요약
리드 생성 및 이메일 워크플로
Google 지도, SendGrid 및 AI를 사용한 B2B 잠재 고객 개발 및 이메일 마케팅 자동화
If
Set
Code
+
If
Set
Code
141 노드Ezema Kingsley Chibuzo
리드 생성
워크플로우 정보
난이도
중급
노드 수15
카테고리2
노드 유형6
저자
Billy Christi
@billyI build scalable automation systems with n8n to help businesses save time and cut costs. 💼 n8n expert available for new projects 📩 billychartanto@gmail.com
외부 링크
n8n.io에서 보기 →
이 워크플로우 공유