我的工作流
中级
这是一个Other, AI领域的自动化工作流,包含 8 个节点。主要使用 Gmail, Aggregate, Agent, ScheduleTrigger, LmChatOpenRouter 等节点,结合人工智能技术实现智能自动化。 使用Gmail、OpenRouter和LangChain的AI摘要每日邮件摘要
前置要求
- •Google 账号和 Gmail API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "lPYVaz2xbN5zFDIL",
"meta": {
"instanceId": "cbc68f6c587084f6fe53914a07ed22d475640cb7a6f4ade193e6f0c6d7a06ce8"
},
"name": "我的工作流",
"tags": [
{
"id": "DaQLpYItTEM2y8Gt",
"name": "Product",
"createdAt": "2025-06-17T10:48:17.486Z",
"updatedAt": "2025-06-17T10:48:17.486Z"
},
{
"id": "6X5c5WbCRWtxJbl2",
"name": "AI",
"createdAt": "2025-06-17T10:48:17.367Z",
"updatedAt": "2025-06-17T10:48:17.367Z"
},
{
"id": "ycHNTMiM8vy98zu1",
"name": "Building blocks",
"createdAt": "2025-06-17T10:48:17.563Z",
"updatedAt": "2025-06-17T10:48:17.563Z"
},
{
"id": "UJ6au0mv063gOupq",
"name": "Finance",
"createdAt": "2025-06-17T10:48:17.583Z",
"updatedAt": "2025-06-17T10:48:17.583Z"
},
{
"id": "CaWiGPzJpyfUHdxp",
"name": "IT Ops",
"createdAt": "2025-06-17T10:48:17.388Z",
"updatedAt": "2025-06-17T10:48:17.388Z"
},
{
"id": "6Uolue5XigSZ2IYx",
"name": "OpenAI",
"createdAt": "2025-06-17T10:48:17.508Z",
"updatedAt": "2025-06-17T10:48:17.508Z"
},
{
"id": "nA8GpDM4XoG5aJ0A",
"name": "Marketing",
"createdAt": "2025-06-17T10:48:17.532Z",
"updatedAt": "2025-06-17T10:48:17.532Z"
},
{
"id": "J4gTJX9lSPm3wByF",
"name": "Support",
"createdAt": "2025-06-17T10:48:17.464Z",
"updatedAt": "2025-06-17T10:48:17.464Z"
},
{
"id": "i294x7TPtUQgJkmv",
"name": "HR",
"createdAt": "2025-06-17T10:48:17.426Z",
"updatedAt": "2025-06-17T10:48:17.426Z"
}
],
"nodes": [
{
"id": "895894ff-943d-4cd0-9311-791b35e4ca57",
"name": "获取邮件 - 过去24小时",
"type": "n8n-nodes-base.gmail",
"position": [
-800,
180
],
"webhookId": "20f1d11d-8a69-43f3-9323-33eaf1b3b600",
"parameters": {
"filters": {
"q": "={{ \n (() => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n return `isb.quantana@quantana.in after:${yesterday.getFullYear()}/${(yesterday.getMonth() + 1).toString().padStart(2, '0')}/${yesterday.getDate().toString().padStart(2, '0')}`;\n })()\n}}"
},
"operation": "getAll",
"returnAll": true
},
"typeVersion": 2.1
},
{
"id": "5518a4f6-5d68-46bf-b29b-1830379917a9",
"name": "整理邮件数据 - 早晨",
"type": "n8n-nodes-base.aggregate",
"position": [
-580,
180
],
"parameters": {
"include": "specifiedFields",
"options": {},
"aggregate": "aggregateAllItemData",
"fieldsToInclude": "id, From, To, CC, snippet"
},
"typeVersion": 1
},
{
"id": "d5598f1c-86a2-49b3-b659-bba4d063878c",
"name": "发送摘要 - 早晨",
"type": "n8n-nodes-base.gmail",
"position": [
16,
180
],
"webhookId": "83f2aeb9-7b6c-4336-b5ed-8acfcd259850",
"parameters": {
"sendTo": "team-email@example.com",
"message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Email Summary - isbonline@quantana.in</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n margin: 0;\n padding: 0;\n background-color: #f9f9f9;\n color: #333;\n line-height: 1.6;\n }\n .email-container {\n max-width: 600px;\n margin: 20px auto;\n background: #ffffff;\n border: 1px solid #ddd;\n border-radius: 10px;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\n }\n .email-header {\n background-color: #0073e6;\n color: #fff;\n padding: 20px;\n text-align: center;\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n }\n .email-header h1 {\n margin: 0;\n font-size: 24px;\n }\n .email-content {\n padding: 20px;\n }\n .section-title {\n font-size: 20px;\n color: #0073e6;\n margin-bottom: 10px;\n }\n ul {\n list-style: none;\n padding: 0;\n }\n ul li {\n margin: 10px 0;\n padding: 10px;\n background: #f4f4f4;\n border-left: 4px solid #0073e6;\n border-radius: 5px;\n }\n .action-item {\n font-weight: bold;\n margin: 5px 0;\n }\n .action-detail {\n margin-left: 10px;\n }\n .email-footer {\n background-color: #0073e6;\n color: #fff;\n text-align: center;\n padding: 10px;\n font-size: 14px;\n border-bottom-left-radius: 10px;\n border-bottom-right-radius: 10px;\n }\n </style>\n</head>\n<body>\n <div class=\"email-container\">\n <div class=\"email-header\">\n <h1>Email Summary</h1>\n </div>\n <div class=\"email-content\">\n <div>\n <h2 class=\"section-title\">Summary of Emails:</h2>\n <ul>\n {{ $json.message.content.summary_of_emails.map(email => `<li>${email}</li>`).join('') }}\n </ul>\n </div>\n <div>\n <h2 class=\"section-title\">Actions:</h2>\n <ul>\n {{ $json.message.content.actions.map(action => `\n <li>\n <span class=\"action-item\">${action.name}:</span>\n <span class=\"action-detail\">${action.action}</span>\n </li>\n `).join('') }}\n </ul>\n </div>\n </div>\n <div class=\"email-footer\">\n <p>Generated by Quantana ESAgent <br /> A Quantana AI Labs Initiative\n </div>\n </div>\n</body>\n</html>",
"options": {
"ccList": "cc-list@example.com",
"appendAttribution": false,
"replyToSenderOnly": false
},
"subject": "=ESAgent - {{ new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }) }}-00:00 to {{ new Date(new Date().setDate(new Date().getDate())).toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }) }}-07:00AM"
},
"typeVersion": 2.1
},
{
"id": "7480f9af-2026-437c-800c-be49eef1895b",
"name": "每日8点触发器",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-1020,
180
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 7
}
]
}
},
"typeVersion": 1.2
},
{
"id": "ab7c5ea2-81a6-4d8d-932c-2de023164304",
"name": "OpenRouter聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
-332,
400
],
"parameters": {
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "W9KyGINw1pnCGjLT",
"name": "OpenRouter account"
}
},
"typeVersion": 1
},
{
"id": "ddf9f7ee-630e-4b3d-8e84-d157d129c671",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-212,
400
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "309bfb47-72e1-4396-ad5f-dc656ea4eefa",
"name": "邮件摘要器",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-360,
180
],
"parameters": {
"options": {
"systemMessage": "Email Processing System\n\nStep 1: Extract Key Details\nRead the email thoroughly and identify:\n\nMain topics discussed\n\nCritical data points (dates, numbers, names)\n\nExplicit requests or requirements\n\nProblems or concerns raised\n\nStep 2: Organize Output\nSummary of Email\nBullet-point list of key takeaways\n\nExample:\n\nProject deadline extended to March 15\n\nNew compliance rules apply to all vendors\n\nIssues Identified\nList problems with context:\n\nIssue: Vendor delay impacting timeline\n\nImpact: Risk to Q2 launch\n\nAction Items\nClear tasks with owners:\n\nTask: Approve revised budget\n\nOwner: Finance Team\n\nDeadline: EOD Friday\n\nFollow-Up Needed\nOpen questions or missing info:\n\n\"Confirm if the client approved the scope change?\"\n\nRules for Clarity\n✔ Be concise – 1 line per point\n✔ Prioritize – Flag urgent items with [!]\n✔ Ownership – Always note who needs to act\n✔ Use plain language – Avoid jargon\n\nExample Output:\n\nSummary\n\nMarketing campaign paused due to budget review\n\nNew analytics tool rollout delayed by 2 weeks\n\nIssues\n\n[!] Budget approval missing – blocking all spend\n\nLow engagement on recent social posts\n\nActions\n\nSend revised budget to CFO (Owner: Alex)\n\nAudit social content (Owner: Marketing, Due: Nov 30)\n\nFollow-Up\n\nIs the budget review meeting scheduled?"
},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "5b97bbf7-5259-4554-a81e-330494bdcc45",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1460,
-160
],
"parameters": {
"width": 1960,
"height": 860,
"content": "# 📧 邮件自动摘要流程 (n8n)"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "54b5fc42-b14e-4949-8b95-d956680caf69",
"connections": {
"Simple Memory": {
"ai_memory": [
[
{
"node": "Email Summarizer",
"type": "ai_memory",
"index": 0
}
]
]
},
"Email Summarizer": {
"main": [
[
{
"node": "Send Summary - Morning",
"type": "main",
"index": 0
}
]
]
},
"Daily 8AM Trigger": {
"main": [
[
{
"node": "Fetch Emails - Past 24 Hours",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model": {
"ai_languageModel": [
[
{
"node": "Email Summarizer",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Fetch Emails - Past 24 Hours": {
"main": [
[
{
"node": "Organize Email Data - Morning",
"type": "main",
"index": 0
}
]
]
},
"Organize Email Data - Morning": {
"main": [
[
{
"node": "Email Summarizer",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 其他, 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI驱动的Gmail邮件自动整理与优先级标签
基于AI的Gmail邮件自动整理,支持自动归档和优先级标签
Gmail
Filter
Telegram
+7
17 节点Junichiro Tobe
其他
每日定时邮件推送
使用 GPT-4o 和 Gmail 的自动化每日邮件分析与摘要
Code
Gmail
Aggregate
+4
12 节点Zach @Ajenta
其他
自动化LinkedIn职位猎手_就绪版
自动化LinkedIn职位猎手:通过邮件获取最佳每日职位匹配
Set
Gmail
Aggregate
+9
26 节点Tianyi
其他
使用Gmail、Google Sheets和AI自动分类邮件
使用Gmail、Google Sheets和AI自动分类邮件
Set
Gmail
Filter
+6
17 节点Milan Vasarhelyi
其他
每日日程简报
AI驱动日程与会议摘要,集成Gmail和GPT-4o/Claude
Code
Gmail
Filter
+9
14 节点Nick Loui
人工智能
自动化博客撰写与社交媒体推广代理
使用GPT-4、Perplexity和WordPress自动化SEO博客创建+社交媒体
Set
Code
Gmail
+21
79 节点LukaszB
设计