Automate Stock Analysis with n8n & Telegram AI Agent

This workflow automates stock technical analysis through Telegram using n8n and AI. It handles text and audio inputs, generates stock charts, and delivers detailed insights, saving you hours of manual research and simplifying complex market data in real-time.
telegramTrigger
openAi
httpRequest
+13
Workflow Identifier: 1011
NODES in Use: telegramTrigger, switch, telegram, openAi, httpRequest, set, airtableTool, splitInBatches, scheduleTrigger, webhook, stickyNote, agent, memoryBufferWindow, toolWorkflow, lmChatOpenAi, openAi

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow solves the problem of slow and manual stock research by automating analysis and chart creation using a Telegram bot.
It handles voice and text queries, makes a stock chart, analyzes it with AI, and sends results back fast.
Traders get quick, easy-to-understand insights without spending hours searching or calculating.

The workflow accepts Telegram messages.
If voice, it transcribes to text using OpenAI.
Then, it calls a chart API to generate detailed stock charts.
AI models analyze charts for technical signals like RSI and candlestick patterns.
Results come back as images and text replies on Telegram.
Stocks can be saved in Airtable for scheduled batch reports.


Tools and Services Used

  • Telegram Bot API: Receives user messages.
  • OpenAI API: Transcribes voice to text and creates AI-driven stock analyses.
  • External Chart Image API: Generates technical stock charts with indicators.
  • Airtable: Stores user-saved ticker symbols for batch processing.
  • n8n Automation Platform: Orchestrates all workflow nodes and logic.


Inputs, Processing, and Outputs

Inputs

Processing Steps

  1. Detect message type with Switch node for voice or text.
  2. If voice, download audio, then transcribe to text using OpenAI.
  3. Extract stock ticker symbol from text.
  4. Send POST request to Chart API for a styled stock chart with technical overlays.
  5. Download the chart image.
  6. Send chart image to OpenAI for technical analysis: RSI, candlesticks, sentiment.
  7. Reply to Telegram with chart image and detailed analysis text.
  8. Save ticker symbol to Airtable for scheduled batch reports if requested.
  9. On schedule, loop through saved tickers, run the analysis workflow per ticker.

Outputs

  • Telegram messages with stock chart images.
  • Textual stock analysis messages from AI.
  • Scheduled batch reports sent automatically.


Who Should Use This Workflow

This is for active stock traders and analysts who spend much time manually searching and analyzing charts.
It helps those who want faster, automated stock insights via Telegram.
Also good for friends or groups needing quick, expert-level stock answers.


Beginner Step-by-Step: How to Use This Workflow in n8n

Importing and Setup

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n Editor.
  3. Use “Import from File” to load the saved workflow.

Configuration

  1. Add all required credentials and API Keys: Telegram Bot, OpenAI, Chart API, Airtable.
  2. Update any IDs such as Telegram chat IDs, Airtable base/table, or other settings as needed.
  3. For HTTP Request nodes, ensure API keys and URLs are correct.

Testing and Activation

  1. Run the workflow manually to send a test message to your Telegram Bot.
  2. Check the bot’s response for correctness.
  3. If everything works, activate the workflow by turning it on in n8n.
  4. Consider using self-host n8n for better uptime if needed.


Customization Ideas

  • Adjust chart style parameters in the Chart API node to different types like bar or line.
  • Change stock exchange prefixes from NASDAQ to NYSE or others.
  • Modify AI Agent prompts for tone or more disclaimers.
  • Add more technical indicators like Bollinger Bands or MACD to the chart request.
  • Set Telegram nodes to use dynamic chat IDs from incoming messages.


Troubleshooting

Common Problems and Solutions

  • “API request failed” or empty chart: Check Chart API key and JSON body format.
  • No message after sending voice: Confirm Telegram bot webhook and updates configuration.
  • AI returns generic answers: Improve AI Agent system prompt and check token limits.


Pre-Production Checklist

  • Confirm Telegram Bot webhook is active.
  • Test both voice and text inputs.
  • Verify Chart API call with a test.
  • Confirm OpenAI keys and limits.
  • Check Airtable permissions.
  • Run the schedule trigger with a sample ticker list.


Summary

✓ Saves hours of manual stock research daily.
✓ Provides fast, clear stock chart images and AI analysis.
✓ Works via Telegram for easy access.
Automates scheduled portfolio reporting.
✓ Easy to set up in n8n with download and import.


Frequently Asked Questions

Yes, any chart API that accepts similar requests and returns image URLs can be used in place of the existing HTTP Request node.
OpenAI usage depends on message volume and models used. GPT-4 and audio transcription cost more tokens. Monitor OpenAI usage carefully.
All API calls use HTTPS securely. Telegram messages are encrypted. Data control remains with the user in Airtable and API keys.
Yes, add desired indicators to the “studies” array in the Chart API request body for deeper technical insights.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free