AI重命名的 Gmail 附件保存到 Drive
中级
这是一个AI Summarization, Multimodal AI领域的自动化工作流,包含 10 个节点。主要使用 Set, Gmail, Merge, GoogleDrive, Agent 等节点。 使用 GPT-4o 自动重命名 Gmail 附件并保存到 Google Drive
前置要求
- •Google 账号和 Gmail API 凭证
- •Google Drive API 凭证
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
无法加载工作流预览
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"name": "AI重命名的 Gmail 附件保存到 Drive",
"tags": [],
"nodes": [
{
"name": "计划触发器",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.2
},
{
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1120,
124
],
"parameters": {
"text": "=You are an expert content analyser and file naming assistant...\ntext: {{ $json.text }}\ndate: {{ $json.info.CreationDate }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1192,
348
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"name": "上传文件",
"type": "n8n-nodes-base.googleDrive",
"position": [
1696,
0
],
"parameters": {
"name": "={{ $json.output }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "url",
"value": ""
},
"inputDataFieldName": "attachment_1"
},
"typeVersion": 3
},
{
"name": "标记消息为已读",
"type": "n8n-nodes-base.gmail",
"position": [
1920,
0
],
"parameters": {
"messageId": "={{ $('Set Required Fields').item.json.id }}",
"operation": "markAsRead"
},
"typeVersion": 2.1
},
{
"name": "合并数据以上传",
"type": "n8n-nodes-base.merge",
"position": [
1472,
0
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.2
},
{
"name": "获取带附件的未读消息",
"type": "n8n-nodes-base.gmail",
"position": [
224,
0
],
"parameters": {
"filters": {
"readStatus": "unread"
},
"operation": "getAll"
},
"typeVersion": 2.1
},
{
"name": "设置必填字段",
"type": "n8n-nodes-base.set",
"position": [
448,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"name": "id",
"type": "string",
"value": "={{ $json.id }}"
},
{
"name": "threadId",
"type": "string",
"value": "={{ $json.threadId }}"
},
{
"name": "from.value[0].name",
"type": "string",
"value": "={{ $json.from.value[0].name }}"
},
{
"name": "date",
"type": "string",
"value": "={{ $json.date }}"
}
]
}
},
"typeVersion": 3.4
},
{
"name": "下载附件",
"type": "n8n-nodes-base.gmail",
"position": [
672,
0
],
"parameters": {
"simple": false,
"options": {
"downloadAttachments": true
},
"messageId": "={{ $json.id }}",
"operation": "get"
},
"typeVersion": 2.1
},
{
"name": "从附件中提取",
"type": "n8n-nodes-base.extractFromFile",
"position": [
896,
0
],
"parameters": {
"options": {},
"operation": "pdf",
"binaryPropertyName": "attachment_0"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "81cda4d6-8828-4b64-8afe-88b302168717",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Merge Data for Upload",
"type": "main",
"index": 1
}
]
]
},
"Upload file": {
"main": [
[
{
"node": "Mark message as read",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Get Unread Messages with Attachments",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Set Required Fields": {
"main": [
[
{
"node": "Download Attachments",
"type": "main",
"index": 0
}
]
]
},
"Download Attachments": {
"main": [
[
{
"node": "Extract from Attachments",
"type": "main",
"index": 0
}
]
]
},
"Merge Data for Upload": {
"main": [
[
{
"node": "Upload file",
"type": "main",
"index": 0
}
]
]
},
"Extract from Attachments": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
],
[
{
"node": "Merge Data for Upload",
"type": "main",
"index": 0
}
]
]
},
"Get Unread Messages with Attachments": {
"main": [
[
{
"node": "Set Required Fields",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - AI 摘要总结, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI 自动保存 Gmail 收据
AI自动保存Gmail收据到Google表格和Google云端硬盘
Set
Gmail
Merge
+8
14 节点Matt Chong
发票处理
我的工作流
整理 Gmail:使用 GPT-4 分类归档非活跃邮件
If
Set
Gmail
+7
13 节点Matt Chong | n8n Creator
AI 摘要总结
AI自动路由电子邮件并发送Slack警报
使用GPT-4o自动分类Gmail邮件并发送优先级Slack警报
Set
Gmail
Slack
+4
7 节点Matt Chong | n8n Creator
AI 摘要总结
使用GPT-4o、GoHighLevel、Google Drive、Slack和Gmail自动化客户入职
使用GPT-4o、GoHighLevel、Google Drive、Slack和Gmail自动化客户入职
Set
Gmail
Slack
+10
17 节点Adam Crafts
AI 摘要总结
使用GPT-4o-mini、Asana、Slack、Google Drive和Gmail自动化客户入职
使用GPT-4o-mini、Asana、Slack、Google Drive和Gmail自动化客户入职
Set
Asana
Gmail
+10
19 节点Adam Crafts
AI 摘要总结
自动向客户发送发票
通过 OCR.Space、GPT-4 和 Google Drive 到 Gmail 实现发票处理的自动化
If
Set
Code
+12
29 节点Michael Taleb
AI 摘要总结
工作流信息
难度等级
中级
节点数量10
分类2
节点类型8
作者
Matt Chong | n8n Creator
@mattxchongAutomation nerd fueled by good coffee, deep curiosity, and clean flows.
外部链接
在 n8n.io 查看 →
分享此工作流