AI를 사용하여 Gmail 이메일 자동 분류 및 레이블 적용하여 받은편지함 정리
중급
이것은Other, AI분야의자동화 워크플로우로, 8개의 노드를 포함합니다.주로 Code, Gmail, Merge, Aggregate, GmailTrigger 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. AI를 사용하여 Gmail 이메일 자동 분류 및 레이블을 적용하여 받은편지함 정리
사전 요구사항
- •Google 계정 및 Gmail API 인증 정보
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"meta": {
"instanceId": "5a90cf25b26f3375705646dd979ac7968c2f7780e9cb14036112ef363426c72c",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "37166e51-ffb6-43fe-8bd5-fe5eb1249366",
"name": "OpenRouter Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
540,
540
],
"parameters": {
"model": "google/gemini-2.5-flash-preview-05-20",
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "ogejgDjpnXZzGonu",
"name": "OpenRouter account"
}
},
"typeVersion": 1
},
{
"id": "067f6b55-dc4c-4757-b19e-2d539b8b2526",
"name": "Gmail 메시지 수집",
"type": "n8n-nodes-base.aggregate",
"position": [
-360,
220
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "7807ff72-49f7-4a7b-9d75-24746d0dfdb7",
"name": "라벨 및 메시지 병합",
"type": "n8n-nodes-base.merge",
"position": [
240,
320
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineAll"
},
"typeVersion": 3.1
},
{
"id": "8c51f04b-3415-4d53-8624-ce8d484145b9",
"name": "AI를 통한 이메일 분류",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
520,
320
],
"parameters": {
"text": "=You are an email classification assistant. Your task is to analyze Gmail email snippets and categorize them into one of the following labels:\n\n1. To respond - Emails requiring a direct personal response from you (questions from individuals, personal conversations, NOT automated feedback requests)\n2. FYI - Emails requesting you to take action, reminders, or alerts about issues (add money requests, payment failures, action needed)\n3. Comment - Emails specifically asking for your feedback, review, or opinion in a professional/collaborative context\n4. Notification - Automated updates about completed or ongoing events (successful payments, transfers sent, deployments, shipments, security alerts)\n5. Meeting update - Calendar invites, meeting changes, or meeting-related communications\n6. Awaiting reply - Follow-up emails or reminders about your pending responses\n7. Actioned - Confirmations of actions YOU specifically took (not automated system actions)\n8. Marketing - Promotional content, sales emails, feature announcements, newsletters, or automated customer feedback surveys\n\nKey classification rules:\n- Automated status updates (deployments, transfers, payments processed) → Notification\n- Requests to add money or take action → FYI\n- Payment failure alerts → FYI\n- Security alert digests → Notification\n- Shipment updates → Notification\n- Direct Debit payment confirmations → Notification\n- Balance update confirmations → Notification\n- Customer satisfaction surveys or feedback requests → Marketing\n- Automated \"how was your experience\" emails → Marketing\n- Only use \"Actioned\" for confirmations of YOUR manual actions\n- Only use \"Marketing\" for promotional content, including feedback surveys\n\nInstructions:\n1. Read the email snippet carefully\n2. Note the sender (if provided) for context\n3. Choose the single most appropriate label based on the rules above\n4. IMPORTANT: Respond ONLY with the number and label (e.g., \"2. FYI\")\n5. Do not include any other text, explanation, or repeat the email content\n\nEmail From:\n{{ $json.From }}\nEmail To:\n{{ $json.To }}\nEmail subject:\n{{ $json.Subject }}\nEmail snippet:\n{{ $json.snippet }}\n\nYour response must be exactly one of these 8 options:\n1. To respond\n2. FYI\n3. Comment\n4. Notification\n5. Meeting update\n6. Awaiting reply\n7. Actioned\n8. Marketing",
"batching": {},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "ddbdc31a-ea27-415e-b9e2-954959cfcb7a",
"name": "새 Gmail 이메일 수신",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
-560,
340
],
"parameters": {
"filters": {},
"pollTimes": {
"item": [
{
"hour": 12
}
]
}
},
"credentials": {
"gmailOAuth2": {
"id": "V5NiRamelad0WTXx",
"name": "Gmail account"
}
},
"typeVersion": 1.2
},
{
"id": "52b3a1d8-3be8-4f57-8759-7ae9abcdb5cb",
"name": "사용 가능한 Gmail 라벨 가져오기",
"type": "n8n-nodes-base.gmail",
"position": [
-140,
220
],
"webhookId": "8574ca24-b439-4bc3-aa28-ae2b539a8d8e",
"parameters": {
"resource": "label",
"returnAll": true
},
"credentials": {
"gmailOAuth2": {
"id": "V5NiRamelad0WTXx",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "2d15670f-5735-4110-a1eb-d5b6b8abef89",
"name": "라벨 이름을 ID로 매핑",
"type": "n8n-nodes-base.code",
"position": [
60,
220
],
"parameters": {
"jsCode": "const items = $input.all();\nconst combinedObject = items.reduce((acc, item) => {\n return { ...acc, [item.json.name]: item.json.id };\n}, {});\n\nreturn { combinedObject };\n"
},
"typeVersion": 2
},
{
"id": "4c5d1e4a-93ce-4f78-b0ce-8b94aff99498",
"name": "분류 라벨 적용",
"type": "n8n-nodes-base.gmail",
"position": [
960,
320
],
"webhookId": "2ffe45e7-a0e3-4304-a6bf-e217c15ea6cc",
"parameters": {
"labelIds": "={{ $('Map Label Names to IDs').item.json.combinedObject[$json.text] }}",
"messageId": "={{ $('Merge Labels & Messages').item.json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "V5NiRamelad0WTXx",
"name": "Gmail account"
}
},
"typeVersion": 2.1
}
],
"pinData": {},
"connections": {
"37166e51-ffb6-43fe-8bd5-fe5eb1249366": {
"ai_languageModel": [
[
{
"node": "8c51f04b-3415-4d53-8624-ce8d484145b9",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"8c51f04b-3415-4d53-8624-ce8d484145b9": {
"main": [
[
{
"node": "4c5d1e4a-93ce-4f78-b0ce-8b94aff99498",
"type": "main",
"index": 0
}
]
]
},
"2d15670f-5735-4110-a1eb-d5b6b8abef89": {
"main": [
[
{
"node": "7807ff72-49f7-4a7b-9d75-24746d0dfdb7",
"type": "main",
"index": 0
}
]
]
},
"7807ff72-49f7-4a7b-9d75-24746d0dfdb7": {
"main": [
[
{
"node": "8c51f04b-3415-4d53-8624-ce8d484145b9",
"type": "main",
"index": 0
}
]
]
},
"067f6b55-dc4c-4757-b19e-2d539b8b2526": {
"main": [
[
{
"node": "52b3a1d8-3be8-4f57-8759-7ae9abcdb5cb",
"type": "main",
"index": 0
}
]
]
},
"ddbdc31a-ea27-415e-b9e2-954959cfcb7a": {
"main": [
[
{
"node": "067f6b55-dc4c-4757-b19e-2d539b8b2526",
"type": "main",
"index": 0
},
{
"node": "7807ff72-49f7-4a7b-9d75-24746d0dfdb7",
"type": "main",
"index": 1
}
]
]
},
"52b3a1d8-3be8-4f57-8759-7ae9abcdb5cb": {
"main": [
[
{
"node": "2d15670f-5735-4110-a1eb-d5b6b8abef89",
"type": "main",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
중급 - 기타, 인공지능
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
시각화 참조 라이브러리에서 n8n 노드를 탐색
可视化 참조 라이브러리에서 n8n 노드를 탐색
If
Ftp
Set
+
If
Ftp
Set
113 노드I versus AI
기타
수신 이메일 태깅, 지식 그래프 구축, Telegram 알림
Gemini AI를 사용한 Gmail 라벨 지정 및 InfraNodus 지식 그래프 구축, Telegram 알림 전송
Code
Wait
Gmail
+
Code
Wait
Gmail
28 노드InfraNodus
기타
Hacker News 타임머신 - 매년 오늘의 인기 내용 확인
Hacker News 타임머신 - 매년 오늘의 인기 내용 확인
Set
Code
Html
+
Set
Code
Html
13 노드ibrhdotme
기타
AI 이메일 분석기: PDF, 이미지 처리
PDF 및 이미지를 처리하여 Google Drive와 Telegram에 저장
If
Set
Code
+
If
Set
Code
31 노드Davide
인공지능
AI 연구 에이전트: Mistral 최적 OCR을 사용한 PDF 자동 분석
AI 연구 에이전트: Mistral 최적 OCR을 사용한 PDF 자동 분석
Set
Code
Gmail
+
Set
Code
Gmail
30 노드Derek Cheung
인공지능
Reddit MVP 생성기
AI 및 Excel 저장소를 사용하여 Reddit에서 MVP 스타트업 아이디어 자동 생성
Code
Merge
Reddit
+
Code
Merge
Reddit
30 노드Jesse White
제품
워크플로우 정보
난이도
중급
노드 수8
카테고리2
노드 유형7
저자
Alex Dunlop
@alexdunlopKiwi Developer & Founder. Working on AI Startups while in London. Passionate about AI Tech, Learning, and Helping Engineers.
외부 링크
n8n.io에서 보기 →
이 워크플로우 공유