智能Gmail分类器:使用OpenAI进行分类和标记
中级
这是一个AI Summarization, Multimodal AI领域的自动化工作流,包含 8 个节点。主要使用 Cron, Gmail, LmChatOpenAi, TextClassifier 等节点。 使用GPT-4o-mini自定义分类自动标记Gmail消息
前置要求
- •Google 账号和 Gmail API 凭证
- •OpenAI API Key
使用的节点 (8)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "MkRETKpIFPWYCRiM",
"meta": {
"instanceId": "3d02c71388317a973647ceedf481a6b7f92941c766cf17f67388ab341d525980",
"templateCredsSetupCompleted": true
},
"name": "智能Gmail分类器:使用openAI进行分类和标记",
"tags": [],
"nodes": [
{
"id": "9038f706-1cf8-4156-9858-969a7bde62e3",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-848,
576
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "h5qIkLzWPJjRPGNc",
"name": "OpenAi account 2"
}
},
"typeVersion": 1.2
},
{
"id": "0ee542ce-85bc-405a-ba04-7a257e8d6f4f",
"name": "工作机会",
"type": "n8n-nodes-base.gmail",
"position": [
-544,
0
],
"webhookId": "5f643023-07de-4b83-a2f7-5f0014a2ec69",
"parameters": {
"labelIds": [
"Label_3116546262966183424"
],
"messageId": "={{ $('Gmail Trigger').item.json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "L68pElfU0dElPrnw",
"name": "Gmail account 3"
}
},
"typeVersion": 2.1
},
{
"id": "ee69125c-46ae-439d-b0b7-c016af1b5df6",
"name": "申请状态",
"type": "n8n-nodes-base.gmail",
"position": [
-544,
192
],
"webhookId": "5f643023-07de-4b83-a2f7-5f0014a2ec69",
"parameters": {
"labelIds": [
"Label_1823036576628176913"
],
"messageId": "={{ $('Gmail Trigger').item.json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "L68pElfU0dElPrnw",
"name": "Gmail account 3"
}
},
"typeVersion": 2.1
},
{
"id": "37f396b6-7327-43db-b4e5-e34756b82a34",
"name": "其他",
"type": "n8n-nodes-base.gmail",
"position": [
-544,
384
],
"webhookId": "5f643023-07de-4b83-a2f7-5f0014a2ec69",
"parameters": {
"labelIds": [
"Label_4879539884577568757"
],
"messageId": "={{ $('Gmail Trigger').item.json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "L68pElfU0dElPrnw",
"name": "Gmail account 3"
}
},
"typeVersion": 2.1
},
{
"id": "d937e43b-7f05-4eda-bf9e-409a325f6999",
"name": "咨询",
"type": "n8n-nodes-base.gmail",
"position": [
-544,
576
],
"webhookId": "5f643023-07de-4b83-a2f7-5f0014a2ec69",
"parameters": {
"labelIds": [
"Label_2255072803109768357"
],
"messageId": "={{ $('Gmail Trigger').item.json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "L68pElfU0dElPrnw",
"name": "Gmail account 3"
}
},
"typeVersion": 2.1
},
{
"id": "eb4f2bf6-4535-4b96-a215-5c99f3f0bb04",
"name": "邮件分类器",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
-944,
288
],
"parameters": {
"options": {
"systemPromptTemplate": "=Please classify the text provided by the user into one of the following categories: {categories}, and use the provided formatting instructions below. Don't explain, and only output the json."
},
"inputText": "={{ $json.text }}",
"categories": {
"categories": [
{
"category": "Job Opportunity",
"description": "Emails that reflects potential jobs matched as per the profile i've shared across various job sites"
},
{
"category": "Application Status",
"description": "Email that updates about any jobs i applied or any updates about the position i interviewed for or the position i didn't get selected"
},
{
"category": "Others",
"description": "The rest of email communication that does not fall under Job Opportunity or Application Status"
},
{
"category": "Enquiries",
"description": "Email that raise enquiry about my details or the work i do or the service i provide."
}
]
}
},
"typeVersion": 1.1
},
{
"id": "1e886235-18c7-4f6e-a744-7a177807e00a",
"name": "每日邮件检查",
"type": "n8n-nodes-base.cron",
"position": [
-1392,
288
],
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 23
}
]
}
},
"typeVersion": 1
},
{
"id": "07c859f1-82ff-4268-bd99-087608931420",
"name": "获取新邮件",
"type": "n8n-nodes-base.gmail",
"position": [
-1168,
288
],
"webhookId": "e76d0a4c-ea02-4ea4-b427-027315c1a846",
"parameters": {
"limit": 10,
"simple": false,
"filters": {
"receivedAfter": "2025-08-10T17:28:41"
},
"options": {},
"operation": "getAll"
},
"credentials": {
"gmailOAuth2": {
"id": "L68pElfU0dElPrnw",
"name": "Gmail account 3"
}
},
"typeVersion": 2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "7aa60bda-b007-4b69-b22a-aac8d578e193",
"connections": {
"Email Classifier": {
"main": [
[
{
"node": "Job Opportunity",
"type": "main",
"index": 0
}
],
[
{
"node": "Application Status",
"type": "main",
"index": 0
}
],
[
{
"node": "Others",
"type": "main",
"index": 0
}
],
[
{
"node": "Enquiries",
"type": "main",
"index": 0
}
]
]
},
"Fetch New Emails": {
"main": [
[
{
"node": "Email Classifier",
"type": "main",
"index": 0
}
]
]
},
"Daily Email Check": {
"main": [
[
{
"node": "Fetch New Emails",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Email Classifier",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - AI 摘要总结, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用艾森豪威尔矩阵和GPT-4.1-mini自动化Gmail邮件分诊
使用艾森豪威尔矩阵和GPT-4.1-mini自动化Gmail邮件分诊
Gmail
Filter
Gmail Trigger
+4
18 节点Cristian Tala Sánchez
AI 摘要总结
使用Gmail、GPT和表格的自动邮件分类与回复系统
使用Gmail、GPT和表格的自动邮件分类与回复系统
Set
Gmail
Error Trigger
+7
35 节点Sergio Afonso
AI 摘要总结
简单邮件分类器
基于GPT-4 Mini分类的Gmail邮件自动分类
Gmail
Gmail Trigger
Lm Chat Open Ai
+3
8 节点Ilyass Kanissi
AI 摘要总结
基于OpenAI GPT-4分类的Gmail邮件自动分类与标记
基于OpenAI GPT-4分类的Gmail邮件自动分类与标记
Gmail
Split In Batches
Schedule Trigger
+3
15 节点Billy Christi
AI 摘要总结
收件箱管理代理
使用GPT-5分类自动标记Gmail邮件
Gmail
Gmail Trigger
Lm Chat Open Ai
+2
8 节点Abideen Bello
AI 摘要总结
使用 GPT-4o mini 分类 Gmail 邮件并发送 Telegram 通知
使用 GPT-4o mini 分类 Gmail 邮件并发送 Telegram 通知
Gmail
Telegram
Gmail Trigger
+4
13 节点Christian Moises
AI 摘要总结
工作流信息
难度等级
中级
节点数量8
分类2
节点类型4
作者
Ashish Kumar Swain
@phoenixHi, I’m Ashish — an automation architect and AI enthusiast helping people work smarter. I build AI-powered workflows that save time, boost productivity, and create real-world impact. Passionate about no-code, startups, and smart systems that scale. Let’s automate success, one workflow at a time! 🚀
外部链接
在 n8n.io 查看 →
分享此工作流