Skip to main content

Analyze stocks via Telegram with GPT‐4, TwelveData, NewsAPI and chart images

Workflow preview

Workflow preview
100%
Analyze stocks via Telegram with GPT‐4, TwelveData, NewsAPI and chart images preview
Open on n8n.io

1. Workflow Overview

AI Powered Stock Analysis Agent is a Telegram based AI workflow it transforms a simple stock name into a complete trading analysis report. Users send a stock/company name through Telegram, and the ...

Best for

  • Crypto Trading automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.openai, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.httprequesttool, n8n-nodes-base.stickynote, n8n-nodes-base.merge, n8n-nodes-base.aggregate, n8n-nodes-base.telegramtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jitesh Dugar.

Original n8n.io source

1.1 Workflow description

Title
Analyze stocks via Telegram with GPT‐4, TwelveData, NewsAPI and chart images
Workflow name
Analyze stocks via Telegram with GPT‐4, TwelveData, NewsAPI and chart images

AI-Powered Stock Analysis Agent is a Telegram-based AI workflow it transforms a simple stock name into a complete trading analysis report.

Users send a stock/company name through Telegram, and the workflow automatically:

  • Converts the company name into a stock symbol
  • Fetches multi-timeframe market data
  • Collects recent stock news
  • Performs AI-powered sentiment analysis
  • Generates a chart image
  • Creates a professional BUY / SELL / HOLD report
  • Sends the final analysis back to Telegram

Node-by-Node Explanation


1. Telegram Stock Request Trigger

What This Node Does

This is the entry point of the workflow.

It listens for incoming Telegram messages and starts the workflow automatically whenever a user sends a stock/company name.

Example

Apple
Tesla
Nvidia

2. Convert to Stock Symbol

What This Node Does

Uses OpenAI to convert a company name into a valid stock ticker symbol.

Example

User Input AI Output
Apple AAPL
Tesla TSLA
Microsoft MSFT

Why This Node Matters

Users do not need to know the exact stock ticker symbol.

The AI intelligently maps company names into valid trading symbols.


3. Fetch 4H Market Data

What This Node Does

Fetches 4-hour interval market data from the TwelveData API.

Data Returned

  • Open Price
  • High Price
  • Low Price
  • Close Price
  • Volume

Why This Node Matters

Helps analyze:

  • Short-term momentum
  • Intraday trends
  • Swing trading opportunities

4. Fetch Daily Market Data

What This Node Does

Retrieves daily stock candle data from TwelveData.

Why This Node Matters

Daily candles help identify:

  • Medium-term trends
  • Support and resistance
  • Trend direction
  • Market strength

5. Fetch Weekly Market Data

What This Node Does

Fetches weekly timeframe stock data.

Why This Node Matters

Weekly charts help analyze:

  • Long-term market structure
  • Major breakouts
  • Investor sentiment
  • Macro trend direction

6. Merge Multi-Timeframe Data

What This Node Does

Combines:

  • 4H chart data
  • Daily chart data
  • Weekly chart data

into one unified dataset.


7. Structure Technical Dataset

What This Node Does

Organizes all merged technical data into a clean structured object.

Why This Node Matters

Makes it easier for downstream AI nodes to process the technical dataset efficiently.


8. Fetch Stock News

What This Node Does

Fetches recent stock-related news using NewsAPI.

Data Collected

  • Headlines
  • Article descriptions
  • Sources
  • Publication dates

9. News Sentiment Analyzer

What This Node Does

Uses OpenAI to evaluate how recent news may impact the stock price.

AI Analysis Includes

  • Bullish sentiment
  • Bearish sentiment
  • Neutral sentiment
  • Confidence score
  • Market rationale

10. Merge Technical and News Data

What This Node Does

Combines:

  • Technical market data
  • News sentiment analysis

into one AI-ready context.

Why This Node Matters

Allows the AI agent to analyze both technical and fundamental signals together.


11. Final AI Context Builder

What This Node Does

Structures all combined stock intelligence into a clean dataset.

Why This Node Matters

Prepares the final AI context before advanced trading analysis begins.


12. AI Stock Tracking

What This Node Does

Acts as the master AI trading analyst.

AI Responsibilities

  • Analyze technical data
  • Analyze news sentiment
  • Detect bullish/bearish setups
  • Generate trading verdicts
  • Suggest entry zones
  • Calculate stop losses
  • Generate target prices
  • Calculate risk/reward ratio

Output Includes

  • BUY / SELL / HOLD verdict
  • Confidence score
  • Technical rationale
  • Trade setup
  • Risk analysis
  • Chart link

13. Send Telegram Analysis Report

What This Node Does

Sends the final AI-generated stock analysis report back to the Telegram user.

Final Output Includes

  • Trading verdict
  • Confidence score
  • Entry zone
  • Stop loss
  • Target price
  • Risk/reward ratio
  • Chart link

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Convert to Stock Symbol

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2.1

Block 2 - News Sentiment Analyzer

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2.1

Block 3 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 4 - AI Stock Tracking

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 5 - Get Chart Image for Stock

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.4

Block 6 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Merge Technical and News Data

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 17 - Final AI Context Builder

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 18 - Structure Technical Dataset

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 19 - Telegram Stock Request Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 20 - Fetch 4H Market Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 21 - Fetch Daily Market Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 22 - Fetch Weekly Market Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 23 - Merge Multi-Timeframe Data

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 24 - Fetch Stock News

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Analyze stocks via Telegram with GPT‐4, TwelveData, NewsAPI and chart images
Complexity advanced
Nodes 31
Categories Crypto Trading, AI Chatbot
Author Jitesh Dugar
Published 12 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15649/15649.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze stocks via Telegram with GPT‐4, TwelveData, NewsAPI and chart images do?

AI Powered Stock Analysis Agent is a Telegram based AI workflow it transforms a simple stock name into a complete trading analysis report. Users send a stock/company name through Telegram, and the ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Crypto Trading, AI Chatbot use case.