使用Gemini 2.5 Pro和TwelveData通过Telegram机器人生成股票交易信号
高级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 36 个节点。主要使用 Set, Code, Wait, Merge, Telegram 等节点。 使用Gemini 2.5 Pro和TwelveData通过Telegram机器人生成股票交易信号
前置要求
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
- •Google Gemini API Key
使用的节点 (36)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "76f564ce9e1f496ea6c3533f155d5217a31a74b1b62bea30c37742947aa7de7c",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "2336bfd7-77f6-45e0-848e-c1aef2470b78",
"name": "实时价格",
"type": "n8n-nodes-base.httpRequest",
"position": [
624,
240
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "41c14484-9ba8-4db5-a023-dda9f24db01e",
"name": "合并1",
"type": "n8n-nodes-base.merge",
"position": [
1104,
-640
],
"parameters": {},
"typeVersion": 3.1
},
{
"id": "74d5469b-252a-4b58-8f0b-244e9c1c45b2",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2464,
-336
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "4f2068dd-9b5d-48df-9e4e-92e10df58efd",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
2240,
-336
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "ba1c4ade-05ca-4687-9911-14d8e1a4d203",
"name": "Google Gemini 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1968,
-304
],
"parameters": {},
"typeVersion": 1
},
{
"id": "40de62de-c2c9-4dac-bb14-1ffeac4e89d8",
"name": "Telegram 触发器",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-1184,
-480
],
"webhookId": "69b0bf4d-fc9d-42c9-b7f2-5ab0af380274",
"parameters": {},
"typeVersion": 1.2
},
{
"id": "58420974-a4e0-4715-8a75-9d69e164ba92",
"name": "EMA 50 - 1日",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
-784
],
"parameters": {},
"executeOnce": false,
"retryOnFail": true,
"typeVersion": 4.1,
"alwaysOutputData": false,
"waitBetweenTries": 5000
},
{
"id": "3d56dde3-677e-471a-9713-3714447e6d31",
"name": "EMA 200 -1日",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
-576
],
"parameters": {},
"executeOnce": false,
"retryOnFail": true,
"typeVersion": 4.1,
"alwaysOutputData": false,
"waitBetweenTries": 5000
},
{
"id": "b0f0de9b-7337-45b0-a71c-34899a6d00b5",
"name": "RSI -1日",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
-384
],
"parameters": {},
"typeVersion": 4.1
},
{
"id": "de4b171d-9a98-4ada-b321-bcd9a9209641",
"name": "ATR -1日",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
-160
],
"parameters": {},
"executeOnce": false,
"retryOnFail": true,
"typeVersion": 4.1,
"alwaysOutputData": false,
"waitBetweenTries": 5000
},
{
"id": "40e0245d-6787-4bba-9673-f55978398cd4",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1520,
-1504
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "52dbac73-cb72-43b6-8234-9993a68f113d",
"name": "添加 Twelve Data API 密钥",
"type": "n8n-nodes-base.set",
"position": [
-256,
-480
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "d767045a-604f-4051-beb8-ac8f068ca31a",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
432,
-944
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "8138c180-2447-4795-b516-6954999e2d34",
"name": "等待 -65秒",
"type": "n8n-nodes-base.wait",
"position": [
512,
-576
],
"webhookId": "bf94c66a-8a4f-455d-93c0-16543346bf31",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "e158f50c-0a29-4acf-8211-dc19ac6ae06e",
"name": "等待1 -65秒",
"type": "n8n-nodes-base.wait",
"position": [
528,
-160
],
"webhookId": "bf94c66a-8a4f-455d-93c0-16543346bf31",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "8ee5fc6c-c606-48eb-9d6b-b57e414f527a",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
432,
-1312
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "b8ec4952-d9fc-41d0-9810-d9947b14a165",
"name": "OHLC -1日",
"type": "n8n-nodes-base.httpRequest",
"position": [
496,
-1168
],
"parameters": {},
"typeVersion": 4.1
},
{
"id": "2122dd68-8954-43d6-a903-014f758808af",
"name": "计算支撑阻力",
"type": "n8n-nodes-base.code",
"position": [
704,
-1168
],
"parameters": {},
"typeVersion": 2
},
{
"id": "e0f62383-7709-4c9e-831f-cce98314d583",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
432,
96
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "61e73466-5a53-4b5c-bcfb-60afe8e4a937",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-736,
-688
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "cff78e80-5206-442c-888e-7b50d1016284",
"name": "设置股票代码",
"type": "n8n-nodes-base.set",
"position": [
-624,
-480
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "4dc67d77-0e44-4288-a26c-5264a30615ad",
"name": "便签 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-368,
-688
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "930e82c3-253e-4c4b-a51b-2e291cddfda6",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1424,
-688
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "b9839038-9591-4cd8-a5c0-b5ac43b39c25",
"name": "整理数据",
"type": "n8n-nodes-base.code",
"position": [
1376,
-576
],
"parameters": {},
"typeVersion": 2
},
{
"id": "df616779-b01b-454f-814e-444e7a670f4c",
"name": "包装 JSON",
"type": "n8n-nodes-base.code",
"position": [
1552,
-576
],
"parameters": {},
"typeVersion": 2
},
{
"id": "ad940cc8-4f11-43ce-8bb7-4bef8ebc4a7a",
"name": "技术分析助手",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2080,
-576
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 1.9
},
{
"id": "85c39fa9-bbaf-41a9-9b20-c1aca7facd0f",
"name": "发送最终分析",
"type": "n8n-nodes-base.telegram",
"position": [
3136,
-560
],
"webhookId": "9c3a2f91-a6a1-44e4-a0be-af20f5e07082",
"parameters": {},
"typeVersion": 1.2
},
{
"id": "dfe507b6-e1b1-4f45-be0c-7eb31831e09c",
"name": "发送 1日图表",
"type": "n8n-nodes-base.telegram",
"position": [
3648,
-560
],
"webhookId": "95769cb4-e3a4-4dc0-9bdb-27f64a12e53f",
"parameters": {},
"typeVersion": 1.2
},
{
"id": "13540280-0ead-48ce-b297-341cbf6763ad",
"name": "获取图表 URL",
"type": "n8n-nodes-base.httpRequest",
"position": [
2928,
-32
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "4ac66624-0762-4c0b-ba3c-09833db34cce",
"name": "下载图表",
"type": "n8n-nodes-base.httpRequest",
"position": [
3216,
-32
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "b6777c9b-ff73-4161-b817-8be849ee6db1",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2784,
-192
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "eecca474-2293-43fb-854c-134ad6d8d5b0",
"name": "便签21",
"type": "n8n-nodes-base.stickyNote",
"position": [
3008,
-944
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "e7c95385-e89f-4d58-9c5c-22ed05715c7b",
"name": "便签22",
"type": "n8n-nodes-base.stickyNote",
"position": [
3456,
-944
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "e6782d73-b88c-46e2-82a4-8b1fced95cdc",
"name": "便签18",
"type": "n8n-nodes-base.stickyNote",
"position": [
1888,
-352
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "59317603-e2ab-4302-9a82-e1bdadd34576",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1312,
-656
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "9465591a-1a0c-4a3a-9b87-8831fde95e79",
"name": "### 替换 Airtable 连接",
"type": "n8n-nodes-base.stickyNote",
"position": [
1968,
-736
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Merge1": {
"main": [
[
{
"node": "Organizing Data",
"type": "main",
"index": 0
}
]
]
},
"ATR -1D": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 4
}
]
]
},
"RSI -1D": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 3
}
]
]
},
"Wait -65s": {
"main": [
[
{
"node": "EMA 200 -1D",
"type": "main",
"index": 0
}
]
]
},
"Warp JSON": {
"main": [
[
{
"node": "Technical Analysis Agent",
"type": "main",
"index": 0
}
]
]
},
"OHLC -1Day": {
"main": [
[
{
"node": "Calculate Support Resistance",
"type": "main",
"index": 0
}
]
]
},
"Wait1 -65s": {
"main": [
[
{
"node": "ATR -1D",
"type": "main",
"index": 0
}
]
]
},
"EMA 200 -1D": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 2
}
]
]
},
"EMA 50 - 1D": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
}
]
]
},
"Get Chart URL": {
"main": [
[
{
"node": "Download Chart",
"type": "main",
"index": 0
}
]
]
},
"Send 1D Chart": {
"main": [
[]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "Technical Analysis Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Download Chart": {
"main": [
[
{
"node": "Send 1D Chart",
"type": "main",
"index": 0
}
]
]
},
"Organizing Data": {
"main": [
[
{
"node": "Warp JSON",
"type": "main",
"index": 0
}
]
]
},
"Real Time Price": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 5
}
]
]
},
"Set Stock Ticker": {
"main": [
[
{
"node": "Add Twelve Data API Key",
"type": "main",
"index": 0
},
{
"node": "Get Chart URL",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Set Stock Ticker",
"type": "main",
"index": 0
}
]
]
},
"Add Twelve Data API Key": {
"main": [
[
{
"node": "OHLC -1Day",
"type": "main",
"index": 0
},
{
"node": "Real Time Price",
"type": "main",
"index": 0
},
{
"node": "EMA 50 - 1D",
"type": "main",
"index": 0
},
{
"node": "Wait -65s",
"type": "main",
"index": 0
},
{
"node": "RSI -1D",
"type": "main",
"index": 0
},
{
"node": "Wait1 -65s",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Technical Analysis Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Technical Analysis Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Technical Analysis Agent": {
"main": [
[
{
"node": "Send Final Analysis",
"type": "main",
"index": 0
}
]
]
},
"Calculate Support Resistance": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用 NanoBanana、Kling 和 LATE Publishing_Bilsimaging 生成产品品牌动画
使用 Gemini AI、Kling 和 LATE 将产品照片转换为社交媒体视频
If
Set
Code
+13
83 节点Bilel Aroua
内容创作
💥 使用NanoBanana、Seedream 4、ChatGPT Image和Veo 3自动化视频广告 - VIDE
使用AI(NanoBanana、Seedream、GPT-4o、Veo 3)自动化和发布视频广告活动
Set
Code
Wait
+16
63 节点Dr. Firas
内容创作
完整的 B2B 销售流程:Apollo 潜在客户生成、Mailgun 外展和 AI 回复管理
完整的 B2B 销售流程:Apollo 潜在客户生成、Mailgun 外展和 AI 回复管理
If
Set
Code
+26
116 节点Paul
内容创作
1. 播放列表详情设置机器人副本
使用 Suno、GPT-4、Runway 和 Creatomate 创建 AI 生成的 YouTube 音乐播放列表
If
Set
Code
+22
203 节点Joseph
内容创作
合并
使用Suno API、Claude和Telegram机器人创建完整的20首YouTube播放列表
If
Set
Code
+17
150 节点Joseph
内容创作
AI驱动的学术作业生成器
使用Google Gemini生成学术作业并通过Telegram/PDF交付
Set
Code
Wait
+9
17 节点Davidson Ahuruezenma
内容创作