Gmail Agent
中级
这是一个AI Chatbot, Multimodal AI领域的自动化工作流,包含 12 个节点。主要使用 GmailTool, Agent, GoogleSheetsTool, ChatTrigger, LmChatGoogleGemini 等节点。 使用 Gemini AI 助手和联系人管理自动化 Gmail 任务
前置要求
- •Google 账号和 Gmail API 凭证
- •Google Sheets API 凭证
- •Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "dCoGIILwTYxSwiHV",
"meta": {
"instanceId": "061ca141d020a6e1355b8c7fe05f92a699e37e92079ad2e150a506ee8bbe9e11"
},
"name": "Gmail Agent",
"tags": [],
"nodes": [
{
"id": "bd41a12c-009b-4812-9807-a68f75a09a81",
"name": "当收到聊天消息时",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
752,
288
],
"webhookId": "a5718612-cc72-403e-9ee5-b5ad46da024f",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "a6cfb7de-5f06-437c-a509-9b45ebcfa14c",
"name": "AI 代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1008,
288
],
"parameters": {
"options": {
"systemMessage": "=You are Rakin’s smart Gmail assistant.\n\nInstructions:\n\nFor any Gmail-related task from Rakin, use the appropriate Gmail tool (Send, Reply, Label, Delete, Get Many).\n\nIf only a name is given (no email), fetch the email from Google Sheets.\n\nAuto-complete any missing details (links, answers, summaries) needed for emails or replies.\n\nApply relevant labels like:\n\nyoutube-viewers\nsales-inquiry\nmeeting-request\npotential-clients\ncollaboration-requests\n\nwhen appropriate.\n\nStay efficient, accurate, and helpful at all times."
}
},
"typeVersion": 2
},
{
"id": "2387aefe-f80c-4e94-b516-1afea31163e7",
"name": "发送",
"type": "n8n-nodes-base.gmailTool",
"position": [
912,
496
],
"webhookId": "f82621ed-6e2e-464b-98c4-c81523615c43",
"parameters": {
"sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
"message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
"options": {
"appendAttribution": false
},
"subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
"emailType": "text"
},
"typeVersion": 2.1
},
{
"id": "90f756fd-d40d-4475-a02d-ddf9592d655b",
"name": "回复",
"type": "n8n-nodes-base.gmailTool",
"position": [
1024,
496
],
"webhookId": "f82621ed-6e2e-464b-98c4-c81523615c43",
"parameters": {
"message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
"options": {
"appendAttribution": false
},
"emailType": "text",
"messageId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message_ID', ``, 'string') }}",
"operation": "reply"
},
"typeVersion": 2.1
},
{
"id": "7eb3e8d2-cc51-403d-ae01-71078a207513",
"name": "标签",
"type": "n8n-nodes-base.gmailTool",
"position": [
1152,
496
],
"webhookId": "f82621ed-6e2e-464b-98c4-c81523615c43",
"parameters": {
"labelIds": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Label_Names_or_IDs', ``, 'string') }}",
"messageId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message_ID', ``, 'string') }}",
"operation": "addLabels"
},
"typeVersion": 2.1
},
{
"id": "34450898-1c3b-4755-848d-93a5c3076d83",
"name": "删除",
"type": "n8n-nodes-base.gmailTool",
"position": [
1264,
496
],
"webhookId": "f82621ed-6e2e-464b-98c4-c81523615c43",
"parameters": {
"messageId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message_ID', ``, 'string') }}",
"operation": "delete"
},
"typeVersion": 2.1
},
{
"id": "862846c3-3488-4932-a93d-69287299e971",
"name": "获取多条",
"type": "n8n-nodes-base.gmailTool",
"position": [
1392,
496
],
"webhookId": "f82621ed-6e2e-464b-98c4-c81523615c43",
"parameters": {
"simple": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Simplify', ``, 'boolean') }}",
"filters": {},
"options": {},
"operation": "getAll",
"returnAll": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}"
},
"typeVersion": 2.1
},
{
"id": "1e39bc28-629a-4902-9e92-ed3d43296ed5",
"name": "表格",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
1504,
496
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UTOyNDNeRJj6nRuladtP61ljeZg6xXK3O1Kn3Dq7t_A/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1UTOyNDNeRJj6nRuladtP61ljeZg6xXK3O1Kn3Dq7t_A",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UTOyNDNeRJj6nRuladtP61ljeZg6xXK3O1Kn3Dq7t_A/edit?usp=drivesdk",
"cachedResultName": "Contact Details"
}
},
"typeVersion": 4.6
},
{
"id": "f7320f18-2a7b-4c55-99eb-1e68ad348b51",
"name": "Gemini",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
672,
496
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "c8857e6d-f0da-4d54-a7b4-c57009ce65d9",
"name": "记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
784,
496
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "133b9714-bf54-440f-8e1b-79e5be3463f6",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-64,
-304
],
"parameters": {
"color": 4,
"width": 660,
"height": 980,
"content": "# 🛠️ 设置指南"
},
"typeVersion": 1
},
{
"id": "fc096be2-2970-4170-badd-e98cab6feb5d",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
656,
-304
],
"parameters": {
"color": 4,
"width": 480,
"height": 448,
"content": "## 从这里开始:分步 YouTube 教程 :star:"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "5d7c251c-1d3f-476e-9090-f101d95bdbea",
"connections": {
"Send": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Label": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Reply": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Sheet": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Delete": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Gemini": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Get Many": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - AI 聊天机器人, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
一体化智能体
个人AI智能体
If
Gmail
Telegram
+13
30 节点Rakin Jakaria
AI 聊天机器人
会议预约助手
会议管理助手
Telegram
Gmail Tool
Date Time Tool
+6
13 节点Rakin Jakaria
AI 聊天机器人
💥 使用ChatGPT-5构建您的第一个AI代理
使用GPT-5、Google日历和表格创建知识库与日程安排AI助手
Gmail Tool
Agent
Google Sheets Tool
+6
14 节点Dr. Firas
杂项
Google Calendar+Gmail管理器
使用Gemini/GPT驱动的AI助手管理Google日历和Gmail
Gmail Tool
Date Time Tool
Agent
+5
16 节点Praneel S
AI 聊天机器人
多智能体Telegram机器人
使用Telegram和Google Gemini的多智能体个人助手机器人
Set
Code
Merge
+18
85 节点Akil A
杂项
聊天机器人Webhook
基于AI的Gmail和日历助手,集成Gemini聊天界面
Set
Webhook
Gmail Tool
+7
19 节点Praneel S
杂项