Analyze stocks in Telegram with Twelve Data, GPT-4o and o3-mini
Needs changesWhat this workflow does
This AI workflow has 46 nodes and runs on Telegram events (message) (plus 1 other trigger). Along the way it connects Telegram, OpenRouter Chat Model, OpenAI and Twelve Data (community).
How it runs
Trigger: On Telegram events (message) (plus 1 other trigger).
- PreProcessing (Edit Fields (Set)): sets 3 fields: message.text, user.name, chat.id
- Get Historical Data (Twelve Data): get time series
- Get Statistics (Twelve Data): get statistics (fundamentals)
- Filter Message Type (Code): runs custom JavaScript code
- Merge: merges the data from its input branches
- Is Valid Message? (If): checks a condition and branches into true / false
- Calculate Risk Metrics (Code): runs custom JavaScript code
- Send Unsupported Message (Telegram): uses Telegram
- AI Agent: runs an AI agent, with model: Analytics_Model; 4 tools (Stock Analysis Tool, Risk Calculator Tool, Sector Analysis Tool, Stock Comparison Tool); memory: Conversation Memory
- Output (Edit Fields (Set)): sets 3 fields: ticker, companyName, response
…plus 28 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent1 (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent1 (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (13)
- Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - Telegram Trigger
n8n-nodes-base.telegramTrigger - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Twelve Data
n8n-nodes-twelve-data.twelveData - Merge
n8n-nodes-base.merge - OpenAI
@n8n/n8n-nodes-langchain.openAi
From the author
TwelveData Pro Analyst — AI-Powered Stock Analysis Bot for Telegram Turn your Telegram into a personal Bloomberg terminal. Ask any question about any stock — get institutional-grade analysis back in seconds. What Is This? TwelveData Pro Analyst is a complete,…