Mail Trainer
Shared 6/30/2026
4 views
Visual Workflow
JSON Code
{
"id": "PfesassApEcmlUrv",
"meta": {
"instanceId": "03433d72440f80607e3a72b5fdd5c2281175eb2c351712f829a37ad77e03541e",
"templateCredsSetupCompleted": true
},
"name": "Mail Trainer",
"tags": [],
"nodes": [
{
"id": "b22f4a76-8efc-498a-8f5d-a3409ab7d79b",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 8
}
]
}
},
"typeVersion": 1.3
},
{
"id": "5fc9faf5-8bb2-4c5a-871a-d56bf31145fa",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
448,
0
],
"parameters": {
"text": "=이메일 ID :{{ $json.id }}\n이메일 제목 : {{ $json.Subject }}\n이메일 요약 : {{ $json.snippet }}",
"options": {
"systemMessage": "당신은 이메일 정리 비서입니다. 입력된 이메일의 제목과 본문을 보고 광고성 메일(홍보, 쿠폰, 뉴스레터 등)인지 판단하세요. 광고라고 판단되면 반드시 제공된 Gmail Tool을 사용해 이 메일을 휴지통으로 보내야 합니다."
},
"promptType": "define"
},
"typeVersion": 3.1
},
{
"id": "cec69769-a103-4ee1-a671-677f871c3545",
"name": "Delete a message in Gmail",
"type": "n8n-nodes-base.gmailTool",
"position": [
592,
224
],
"webhookId": "8726ce18-07c9-4c61-991f-ea9456d2fce2",
"parameters": {
"messageId": "={{ $json.id }}",
"operation": "delete"
},
"credentials": {
"gmailOAuth2": {
"id": "y55mpPkPj0CNufa0",
"name": "Gmail OAuth2 API"
}
},
"typeVersion": 2.2
},
{
"id": "c2ef443a-ee16-4620-ae73-0bbc702a774a",
"name": "Get many messages",
"type": "n8n-nodes-base.gmail",
"position": [
224,
0
],
"webhookId": "ab5046b9-3664-4c35-9d62-f2db95ffe4ba",
"parameters": {
"limit": 20,
"filters": {},
"operation": "getAll"
},
"credentials": {
"gmailOAuth2": {
"id": "y55mpPkPj0CNufa0",
"name": "Gmail OAuth2 API"
}
},
"typeVersion": 2.2
},
{
"id": "6e3e2cdd-ae77-4b8f-ac37-d09d31260a72",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
320,
208
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5-mini"
},
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"id": "woaqdCGYc4nNakgT",
"name": "OpenAI account"
}
},
"typeVersion": 1.3
}
],
"active": true,
"pinData": {},
"settings": {
"binaryMode": "separate",
"availableInMCP": false,
"executionOrder": "v1"
},
"versionId": "04942162-3183-4583-a83e-3d32469ef4ec",
"nodeGroups": [],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Get many messages",
"type": "main",
"index": 0
}
]
]
},
"Get many messages": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Delete a message in Gmail": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}