构建集成Gemini Pro AI和Google Docs的Telegram聊天机器人
这是一个Support Chatbot, AI Chatbot, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Wait, Telegram, GoogleDocsTool, SplitInBatches, HttpRequestTool 等节点。 构建集成Gemini Pro AI和Google Docs的Telegram聊天机器人
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
使用的节点 (9)
{
"meta": {
"instanceId": "cb9a1e5321767b6316634728341237e564b2587ab15b74ca0a89eb02a53484d6",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "17ac7115-a306-40bf-8b4a-9ce66ebbe3f1",
"name": "向模型发送消息",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
4800,
1232
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-pro",
"cachedResultName": "models/gemini-2.5-pro"
},
"options": {},
"messages": {
"values": [
{
"content": "Replay test write user-friendly."
}
]
}
},
"typeVersion": 1
},
{
"id": "fbd4e562-fb5a-4e85-9814-75e4a9df2900",
"name": "发送短信",
"type": "n8n-nodes-base.telegram",
"position": [
5216,
1232
],
"webhookId": "3111e55e-41d3-4e3b-863c-bfda700bba92",
"parameters": {
"text": "={{ $json.content.parts[0].text }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.from.id }}",
"replyMarkup": "replyKeyboard",
"additionalFields": {},
"replyKeyboardOptions": {}
},
"typeVersion": 1.2
},
{
"id": "98b5b120-ab55-47b2-8f0d-0bc29b32bb7f",
"name": "在Google Docs中获取文档",
"type": "n8n-nodes-base.googleDocsTool",
"position": [
5184,
1488
],
"parameters": {
"simple": false,
"operation": "get",
"documentURL": "https://docs.google.com/document/d/19vaCViYaFkjFM6azAMf6fH6tDL2cwSsjTE5vX3eK6Ss"
},
"typeVersion": 2
},
{
"id": "c3df74b4-6077-4383-9c23-2f7505cea1fe",
"name": "Telegram触发器",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
4224,
1216
],
"webhookId": "05fcff6f-5e32-4599-9b29-c585878352d8",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"typeVersion": 1.2
},
{
"id": "41eee1be-dfb9-4e7d-b659-a9de0e740e7a",
"name": "等待 1 秒",
"type": "n8n-nodes-base.wait",
"position": [
5488,
1232
],
"webhookId": "8223d68f-b3b2-4c42-a6d2-473a19e2904c",
"parameters": {
"amount": 1
},
"typeVersion": 1.1
},
{
"id": "3dc90867-9946-4143-aeb9-a096993486c5",
"name": "在 Google Gemini 中向模型发送消息",
"type": "@n8n/n8n-nodes-langchain.googleGeminiTool",
"position": [
4992,
1488
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.0-flash-exp",
"cachedResultName": "models/gemini-2.0-flash-exp"
},
"options": {},
"messages": {
"values": [
{
"content": "Replay test write user-friendly."
}
]
}
},
"typeVersion": 1
},
{
"id": "0049c3fc-f6a2-420f-b0ca-c7330021a405",
"name": "HTTP 请求",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
4768,
1488
],
"parameters": {
"url": "https://devcodejourney.com/",
"options": {},
"toolDescription": "Replay test write user-friendly."
},
"typeVersion": 4.2
},
{
"id": "162fb82a-9ced-401a-a67e-6c4d3b84d118",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
2544,
1184
],
"parameters": {
"width": 1552,
"height": 2352,
"content": "# 🤖 在 n8n 中实现 Telegram + Gemini + Google Docs 自动化"
},
"typeVersion": 1
},
{
"id": "9c16c31f-95db-40ab-aa8d-37750b123d2a",
"name": "## 如何实施此 n8n 工作流",
"type": "n8n-nodes-base.splitInBatches",
"position": [
4480,
1216
],
"parameters": {
"options": {}
},
"typeVersion": 3
}
],
"pinData": {},
"connections": {
"Wait 1s": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"ai_tool": [
[
{
"node": "Message a model",
"type": "ai_tool",
"index": 0
}
]
]
},
"Message a model": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items1": {
"main": [
[],
[
{
"node": "Message a model",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Send a text message": {
"main": [
[
{
"node": "Wait 1s",
"type": "main",
"index": 0
}
]
]
},
"Get a document in Google Docs": {
"ai_tool": [
[
{
"node": "Message a model",
"type": "ai_tool",
"index": 0
}
]
]
},
"Message a model in Google Gemini": {
"ai_tool": [
[
{
"node": "Message a model",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 客服机器人, AI 聊天机器人, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
DevCode Journey
@devcodejourneyI build intelligent systems that automate tasks, streamline workflows, and enhance user experiences using tools like n8n, AI chatbots, and modern automation platforms. With a passion for solving real-world problems through smart technology, I create custom solutions that help individuals and businesses save time, scale faster, and work smarter. Whether it's integrating APIs, building no-code/low-code automations, or developing conversational AI, I'm always exploring the edge of what's possible.
分享此工作流