智能邮件草稿生成器
中级
这是一个AI领域的自动化工作流,包含 6 个节点。主要使用 Set, Gmail, EmailReadImap, ChainLlm, LmOllama 等节点,结合人工智能技术实现智能自动化。 智能邮件草稿生成器
前置要求
- •Google 账号和 Gmail API 凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "TXzwSeIj2lNw8Pr7",
"meta": {
"instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
"templateCredsSetupCompleted": true
},
"name": "智能邮件草稿生成器",
"tags": [],
"nodes": [
{
"id": "2f4d2db0-f825-4064-b9c4-059570ca28e8",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
-20
],
"parameters": {
"content": "此工作流从邮件(IMAP)触发,使用 Basic LLM 或 Ollama 模型处理文本,设置邮件字段,并将其保存为草稿。"
},
"typeVersion": 1
},
{
"id": "8cc89e3d-ab69-4c3e-8753-ef79a105fd62",
"name": "检查新邮件(IMAP)",
"type": "n8n-nodes-base.emailReadImap",
"position": [
500,
220
],
"parameters": {
"options": {}
},
"credentials": {
"imap": {
"id": "D3nLrSlP1dHWcIDE",
"name": "IMAP account"
}
},
"typeVersion": 2
},
{
"id": "d4098fe8-b946-441a-8f7d-1aada1cb6625",
"name": "使用 AI 处理邮件",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
700,
220
],
"parameters": {
"text": "={{ $json.textPlain }}",
"messages": {
"messageValues": [
{
"message": "=this is email\n\n{{ $json.textPlain }}\n\ni need reply of this "
}
]
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "1bb72900-6d50-449a-bf8a-49cbeb0cfc86",
"name": "自定义 AI 模型",
"type": "@n8n/n8n-nodes-langchain.lmOllama",
"position": [
700,
420
],
"parameters": {
"model": "llama3.2-16000:latest",
"options": {}
},
"credentials": {
"ollamaApi": {
"id": "h9CEBFmYALm3FvZf",
"name": "Ollama account"
}
},
"typeVersion": 1
},
{
"id": "2308c0c8-c232-4560-b120-598addd7e4c5",
"name": "准备邮件内容",
"type": "n8n-nodes-base.set",
"position": [
1100,
220
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "7d428c48-4809-45d8-ba1e-c96d68c02c07",
"name": "from",
"type": "string",
"value": "={{ $('Check New Email (IMAP)').first().json.from }}"
},
{
"id": "63b99545-3d2d-4563-b9d7-078cbc20dbcc",
"name": "subject",
"type": "string",
"value": "=Re: {{ $('Check New Email (IMAP)').first().json.subject }}"
},
{
"id": "11d94d3f-2170-4b54-b5f9-b85bb95ad472",
"name": "text",
"type": "string",
"value": "={{ $json.text }} "
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f2c81d97-0b15-4fbb-a050-4f2750b1af9c",
"name": "保存为 Gmail 草稿",
"type": "n8n-nodes-base.gmail",
"position": [
1320,
220
],
"webhookId": "18c29d10-9bf5-4678-b6ba-c93ed6865317",
"parameters": {
"message": "={{ $json.text }}",
"options": {},
"subject": "={{ $json.subject }}",
"resource": "draft"
},
"credentials": {
"gmailOAuth2": {
"id": "by23DyfIoJ8iWfSI",
"name": "Gmail account"
}
},
"typeVersion": 2.1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "66359f5c-1ada-4470-bc27-4796360c2fe8",
"connections": {
"Custom AI Model": {
"ai_languageModel": [
[
{
"node": "Process Email with AI",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Save as Gmail Draft": {
"main": [
[]
]
},
"Prepare Email Content": {
"main": [
[
{
"node": "Save as Gmail Draft",
"type": "main",
"index": 0
}
]
]
},
"Process Email with AI": {
"main": [
[
{
"node": "Prepare Email Content",
"type": "main",
"index": 0
}
]
]
},
"Check New Email (IMAP)": {
"main": [
[
{
"node": "Process Email with AI",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI驱动的LinkedIn联系人推荐器
基于AI的LinkedIn联系人推荐器
Set
Code
Email Send
+5
10 节点Oneclick AI Squad
潜在客户开发
自动旅行行程规划器:邮件和WhatsApp旅行助手
通过邮件和WhatsApp使用Llama AI生成个性化旅行行程
If
Set
Whats App
+6
9 节点Oneclick AI Squad
客服机器人
AI 旅行助手
通过邮件使用 Llama AI 自动生成旅行行程
Set
Email Send
Email Read Imap
+3
7 节点OneClick IT Consultancy P Limited
客户支持
基于病史的个性化饮食计划生成器
使用Ollama AI和邮件自动化从健康报告创建个性化饮食计划
Wait
Email Send
Email Read Imap
+3
6 节点Oneclick AI Squad
文档提取
入职
AI客户入职代理:自动欢迎邮件生成器
Set
Gmail
Error Trigger
+6
20 节点Yaron Been
客户支持
入职流程
AI客户入职代理:自动欢迎邮件生成器
Set
Gmail
Error Trigger
+6
11 节点Yaron Been
客户支持
工作流信息
难度等级
中级
节点数量6
分类1
节点类型6
作者
Oneclick AI Squad
@oneclick-aiThe AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.
外部链接
在 n8n.io 查看 →
分享此工作流