AI日历代理[n8n专业版]
高级
这是一个Other, Building Blocks, AI领域的自动化工作流,包含 19 个节点。主要使用 If, Set, Telegram, Agent, TelegramTrigger 等节点,结合人工智能技术实现智能自动化。 使用GPT-4、Telegram和Google日历通过语音和文本管理日历
前置要求
- •Telegram Bot Token
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "X5xgTiDwTjqy8RqW",
"meta": {
"instanceId": "fc43dbbe2855b618f22a32e0af198c70dc1ce7b2c715dfe283e581dd4cc1c13a",
"templateCredsSetupCompleted": true
},
"name": "Agent AI Calendar [n8n pro]",
"tags": [],
"nodes": [
{
"id": "01b29a4c-25cf-4c03-ab87-810f070d4be3",
"name": "创建事件",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
640,
340
],
"parameters": {
"end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', `Cand se termina evenimentul`, 'string') }}",
"start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', `Cand incepe evenimentul`, 'string') }}",
"calendar": {
"__rl": true,
"mode": "id",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Calendar', ``, 'string') }}",
"__regex": "(^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)"
},
"additionalFields": {
"description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', ``, 'string') }}"
},
"useDefaultReminders": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Use_Default_Reminders', `Daca vrei sa folosesti reminderul defaul de la calendar sau vrei unul special`, 'boolean') }}"
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "27JiaYgdKeyU1SZC",
"name": "Google Calendar account"
}
},
"typeVersion": 1.3
},
{
"id": "1758e2e3-e25d-4b1b-b57d-c711ec8553ce",
"name": "获取事件",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
760,
340
],
"parameters": {
"options": {},
"timeMax": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', ``, 'string') }}",
"timeMin": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', ``, 'string') }}",
"calendar": {
"__rl": true,
"mode": "id",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Calendar', ``, 'string') }}",
"__regex": "(^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)"
},
"operation": "getAll",
"returnAll": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}"
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "27JiaYgdKeyU1SZC",
"name": "Google Calendar account"
}
},
"typeVersion": 1.3
},
{
"id": "9092f4dd-1982-4bb7-94f9-7f29e4fec6ef",
"name": "更新日历",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
880,
340
],
"parameters": {
"eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}",
"calendar": {
"__rl": true,
"mode": "id",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Calendar', ``, 'string') }}",
"__regex": "(^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)"
},
"operation": "update",
"updateFields": {},
"useDefaultReminders": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Use_Default_Reminders', ``, 'boolean') }}"
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "27JiaYgdKeyU1SZC",
"name": "Google Calendar account"
}
},
"typeVersion": 1.3
},
{
"id": "738a78e0-6256-4827-aac9-9eaf7c6ae91c",
"name": "删除事件",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
1000,
340
],
"parameters": {
"eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}",
"options": {},
"calendar": {
"__rl": true,
"mode": "id",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Calendar', ``, 'string') }}",
"__regex": "(^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)"
},
"operation": "delete"
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "27JiaYgdKeyU1SZC",
"name": "Google Calendar account"
}
},
"typeVersion": 1.3
},
{
"id": "19674d23-67eb-46a1-a975-d64a64b6188a",
"name": "接收用户输入 (Telegram)",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-360,
0
],
"webhookId": "19e39057-373f-4ca7-b999-c747d5f71767",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "NYxlz922izZOpLZg",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "0159ed56-542d-4fa1-867f-cba130466061",
"name": "是否为语音消息?",
"type": "n8n-nodes-base.if",
"position": [
-80,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c64b00ea-20f1-4d44-aed6-1528d537fc84",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.message.voice.mime_type }}",
"rightValue": "audio/ogg"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "008051e4-e006-4f18-a204-f64b322a4da6",
"name": "下载语音文件",
"type": "n8n-nodes-base.telegram",
"position": [
140,
-100
],
"webhookId": "1e904d77-b0a3-41ac-8624-a729103c9a14",
"parameters": {
"fileId": "={{ $('Receive User Input (Telegram)\t').item.json.message.voice.file_id }}",
"resource": "file"
},
"credentials": {
"telegramApi": {
"id": "NYxlz922izZOpLZg",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "e738c52a-d6b4-4fde-8dd8-2095db8eaf88",
"name": "语音转文本",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
320,
-100
],
"parameters": {
"options": {
"language": "en"
},
"resource": "audio",
"operation": "transcribe"
},
"credentials": {
"openAiApi": {
"id": "XYtY87CqnqwNVBos",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "5563f7c4-a87a-4728-a5ae-6e17ba59ff99",
"name": "提取文本消息",
"type": "n8n-nodes-base.set",
"position": [
140,
100
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "41b525e6-a59f-47c7-b6ee-2b88eaa386fe",
"name": "Text",
"type": "string",
"value": "={{ $json.message.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "7ee11667-7834-464d-92e8-07be97f7f18a",
"name": "AI 日历助手 (LangChain)",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
520,
100
],
"parameters": {
"text": "=You're my personal digital assistant. Your purpose is to help me manage my personal calendar efficiently, taking into account priorities, work-life balance, and recurring events.\n\nToday is {{ $now }}\n\nInstructions:\n{{ $json.text }}\n{{ $json.Text }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "8651b116-a5eb-4e21-b03f-5375efb0d8ed",
"name": "GPT-4 语言模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
360,
340
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "gpt-4.1"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "XYtY87CqnqwNVBos",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "d014339d-7cb6-4bfe-bfbe-3f319a4fdf2c",
"name": "发送回复到 Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
940,
100
],
"webhookId": "b85c201f-13bd-4990-83e9-62c5e38fa8a4",
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Receive User Input (Telegram)\t').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "NYxlz922izZOpLZg",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "6c74e5a0-56dc-4fbf-8826-fb1b16d96504",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
-740
],
"parameters": {
"width": 1600,
"height": 140,
"content": "## 全局工作流描述"
},
"typeVersion": 1
},
{
"id": "5728ff55-e8c3-4b3f-9c85-0b111c1e18ec",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
-480
],
"parameters": {
"height": 320,
"content": "## 开始 / 输入"
},
"typeVersion": 1
},
{
"id": "a2d2cdbf-ad34-4931-a4c9-ba79c89e09ac",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-140,
-480
],
"parameters": {
"width": 200,
"height": 320,
"content": "## 决策:语音或文本"
},
"typeVersion": 1
},
{
"id": "92b826ed-4189-4d0e-911a-48ae3b44c45e",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
120,
-480
],
"parameters": {
"width": 300,
"height": 320,
"content": "## 语音转录"
},
"typeVersion": 1
},
{
"id": "fbdcd510-14b6-4d50-8fd7-352b421ac8a4",
"name": "便签说明4",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
300
],
"parameters": {
"height": 240,
"content": "## 文本提取"
},
"typeVersion": 1
},
{
"id": "76874498-00dc-499f-9930-8f02e143ad8d",
"name": "便签说明5",
"type": "n8n-nodes-base.stickyNote",
"position": [
440,
500
],
"parameters": {
"width": 640,
"height": 360,
"content": "## AI 解释"
},
"typeVersion": 1
},
{
"id": "7d55eed3-9715-4759-a806-e6d56e38f892",
"name": "便签 6",
"type": "n8n-nodes-base.stickyNote",
"position": [
820,
-220
],
"parameters": {
"width": 340,
"height": 240,
"content": "## 发送回复"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "bca5c9d1-8464-47a8-aa76-0b864ef17a3f",
"connections": {
"Get events": {
"ai_tool": [
[
{
"node": "AI Calendar Assistant (LangChain)\t",
"type": "ai_tool",
"index": 0
}
]
]
},
"Create Event": {
"ai_tool": [
[
{
"node": "AI Calendar Assistant (LangChain)\t",
"type": "ai_tool",
"index": 0
}
]
]
},
"Detele Event": {
"ai_tool": [
[
{
"node": "AI Calendar Assistant (LangChain)\t",
"type": "ai_tool",
"index": 0
}
]
]
},
"Update Calendar": {
"ai_tool": [
[
{
"node": "AI Calendar Assistant (LangChain)\t",
"type": "ai_tool",
"index": 0
}
]
]
},
"Is Voice Message?\t": {
"main": [
[
{
"node": "Download Voice File\t",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract Text Message\t",
"type": "main",
"index": 0
}
]
]
},
"Download Voice File\t": {
"main": [
[
{
"node": "Transcribe Voice to Text\t",
"type": "main",
"index": 0
}
]
]
},
"Extract Text Message\t": {
"main": [
[
{
"node": "AI Calendar Assistant (LangChain)\t",
"type": "main",
"index": 0
}
]
]
},
"GPT-4 Language Model\t": {
"ai_languageModel": [
[
{
"node": "AI Calendar Assistant (LangChain)\t",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Transcribe Voice to Text\t": {
"main": [
[
{
"node": "AI Calendar Assistant (LangChain)\t",
"type": "main",
"index": 0
}
]
]
},
"Send Response to Telegram\t": {
"main": [
[]
]
},
"Receive User Input (Telegram)\t": {
"main": [
[
{
"node": "Is Voice Message?\t",
"type": "main",
"index": 0
}
]
]
},
"AI Calendar Assistant (LangChain)\t": {
"main": [
[
{
"node": "Send Response to Telegram\t",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 其他, 构建模块, 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
构建与销售AI自动化与智能体
构建与销售AI自动化与智能体
If
Set
Wait
+15
74 节点NICKYAI
其他
通过AI代理从Telegram记录餐食营养到Google Sheets
使用AI代理从Telegram记录餐食营养信息到Google Sheets
If
Set
Code
+11
23 节点PollupAI
其他
语音支持工作流
AI语音教练与生成器:使用Telegram、OpenAI和Gemini
If
Set
Code
+9
22 节点NanaB
其他
基于 MCP 服务器的 AI Telegram 任务管理器
集成 MCP 服务器的 AI Telegram 任务管理系统
Set
Switch
Telegram
+9
21 节点Francis Njenga
其他
使用AI从Telegram创建社交媒体内容
使用AI从Telegram创建社交媒体内容
Set
Switch
Telegram
+9
16 节点Onur
其他
音乐生成工作流
使用 Suno API、Flux、Runway 和 Creatomate 生成 AI 歌曲和音乐视频
Set
Wait
Merge
+16
60 节点Joseph
其他