智能邮件草稿生成器
这是一个AI领域的自动化工作流,包含 6 个节点。主要使用 Set、Gmail、EmailReadImap、ChainLlm、LmOllama 等节点,结合人工智能技术实现智能自动化。 智能邮件草稿生成器
- •Google 账号和 Gmail API 凭证
分类
{
"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 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个中级难度的工作流,适用于AI等场景。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
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.
分享此工作流