An n8n agentic workflow that delivers AI-powered stock analysis via Telegram — supporting text and voice inputs, generating technical charts with RSI and candlestick analysis, saving watchlists to Airtable, and running scheduled batch reports automatically.
Users interact with an AI agent through Telegram. They can type or speak a stock ticker, and the agent returns a technical chart plus a detailed analysis covering candlestick patterns, RSI, Stochastic RSI, and volume — in plain English.
A second scenario runs on a schedule: the agent pulls saved tickers from Airtable and generates reports for each one automatically, with no user trigger required.
┌─────────────────────────────────────────────────────────┐
│ Scenario 1: Interactive (Telegram) │
│ │
│ Telegram Message (text or voice) │
│ │ │
│ ▼ │
│ Switch ──── voice ──► Download File ──► Transcribe │
│ │ │ │
│ └──── text ────────────────────────────┘ │
│ │ │
│ ▼ │
│ AI Agent (GPT-4o) │
│ + Window Buffer Memory │
│ │ │ │
│ ▼ ▼ │
│ Get Chart Save Ticker → Airtable │
│ (sub-workflow) │
│ │ │
│ Download Chart │
│ │ │
│ Technical Analysis (GPT-4o vision) │
│ │ │
│ ┌────────┴────────┐ │
│ ▼ ▼ │
│ Send Chart Send Analysis │
│ (Telegram) (Telegram) │
└─────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────┐
│ Scenario 2: Scheduled Batch Reports │
│ │
│ Schedule Trigger │
│ │ │
│ ▼ │
│ Get Tickers (Airtable) │
│ │ │
│ ▼ │
│ Loop Over Items ──► Run Agent (Webhook) ──► Analysis │
└─────────────────────────────────────────────────────────┘
Flexible Input
- Text messages via Telegram
- Voice messages — transcribed via OpenAI Whisper then analyzed
- Webhook for programmatic triggers
- Scheduled execution for saved watchlists
Chart Generation
- Generates candlestick, bar, or line charts per user preference
- Default: candlestick style
- Configured with 1-week interval and technical indicators: Volume, RSI, Stochastic RSI
- Charts delivered as images directly to Telegram
Technical Analysis (GPT-4o Vision)
- Candlestick pattern interpretation (bullish engulfing, doji, hammer, etc.)
- RSI value with market positioning (overbought / oversold / neutral)
- Stochastic RSI K and D line analysis including crossovers and divergences
- Volume trend interpretation
- Plain-English conclusions — no jargon
Watchlist & Scheduling
- Users can save tickers to Airtable via the agent
- Scheduled trigger runs batch analysis across all saved tickers automatically
- Each ticker gets its own chart + analysis delivered to Telegram
Conversation Memory
- Window Buffer Memory keeps context across multi-turn conversations
- Users can follow up ("what about the RSI on that one?") without repeating the ticker
| Component | Tool |
|---|---|
| Workflow Orchestrator | n8n |
| AI Agent | OpenAI GPT-4o |
| Voice Transcription | OpenAI Whisper |
| Chart Vision Analysis | OpenAI GPT-4o (vision) |
| Notification | Telegram Bot API |
| Data Persistence | Airtable |
| Chart Generation | Chart API (candle/bar/line + indicators) |
| File | Description |
|---|---|
trading_agent_workflow.json |
Full production workflow (import to n8n) |
Stock_Analysis_Workflow_Solution.json |
Alternative solution variant |
stock_price_analysis.ipynb |
Exploratory analysis notebook |
- Import
trading_agent_workflow.jsoninto your n8n instance - Configure credentials:
OPENAI_API_KEYTELEGRAM_BOT_TOKEN+TELEGRAM_CHAT_IDAIRTABLE_API_KEY+ Base/Table IDs for watchlist storage
- Set your default tickers in the Schedule Trigger node
- Activate the workflow
Multi-trigger agentic workflow design, voice-to-text integration, GPT-4o vision analysis, Telegram bot integration, Airtable data persistence, scheduled automation, conversation memory, sub-workflow architecture

