Real-Time Crypto Market Data Agent for Telegram - n8n Workflow

Build a powerful n8n workflow using LangChain and OpenAI to fetch real-time Binance spot market data via Telegram. Get instant, formatted crypto reports using this advanced n8n template.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Cryptocurrencies traders needing quick, authenticated market reports.

  • n8n developers seeking advanced examples of AI agent orchestration.

  • Users looking for production-ready n8n templates integrating Telegram, OpenAI, and custom HTTP tools.

  • Professionals requiring real-time, structured financial data reporting.

Overview

This sophisticated n8n workflow template demonstrates how to create a highly functional, secure AI agent accessible directly through Telegram. The core of this system is the Binance AI Agent n8n node, which acts as a dispatcher and orchestrator. It uses a range of HTTP Request Tool n8n nodes to access various Binance API endpoints (live price, 24h stats, order book depth, klines). Unlike simple scripting, this n8n solution utilizes an OpenAI language model (GPT-4o mini via the n8n node) for intelligent tool selection, data combination, and, critically, formatting the final report into clean Telegram HTML. This complete n8n workflow handles user authentication and memory management, providing a secure and powerful real-time reporting tool based on proven n8n templates.

How it Works

The automation begins with the Telegram Trigger n8n node, which serves as the entry point, listening for a user command. Upon receipt, a Code n8n node named 'User Authentication' immediately checks the sender's ID against a whitelist defined within the n8n workflow, ensuring only authorized users can proceed. The data is then packaged with a unique session ID using the Set n8n node, preparing the input for context management. The command is passed to the core Binance AI Agent n8n node. This agent, leveraging the capabilities of the integrated OpenAI Chat Model, uses its defined toolset (the various Binance API n8n nodes) to fetch the required market data. The agent then utilizes the 'Think' and 'Calculator' utility tools to structure the raw JSON into a human-readable, HTML-formatted report. Before delivery, a second Code n8n node ('Splits message...') automatically checks if the output exceeds Telegram's 4000-character limit. If necessary, it splits the long response into safe chunks. Finally, the Telegram n8n node sends the complete, formatted report(s) back to the authenticated user via the configured bot. This comprehensive n8n workflow ensures robustness and compliance with platform constraints.

Installation Guide


  1. Import the n8n Workflow: Copy the provided JSON and import it into your n8n instance via the 'Workflows' > 'New' > 'Import from JSON' option.

  2. Telegram Credentials: You must provide credentials for a Telegram Bot in the Telegram Trigger n8n node and the final Telegram n8n node. Ensure the bot is running and configured correctly.

  3. OpenAI Credentials: Set up your OpenAI API key in the OpenAI Chat Model n8n node. This n8n workflow requires access to gpt-4o-mini.

  4. Set Authentication: Crucially, navigate to the 'User Authentication (Replace Telegram ID)' Code n8n node and replace <> with your actual Telegram User ID number to whitelist yourself.

  5. Activate: Ensure the workflow is set to 'Active'. The Telegram Trigger n8n trigger will immediately begin listening for messages.

Node Details

This n8n workflow utilizes several specialized n8n nodes for optimal performance:

Telegram Trigger n8n trigger: Listens for incoming messages to initiate the process. It's the primary n8n trigger for the entire system.
User Authentication (Code n8n node): Implements a security check. This crucial n8n node ensures that the Telegram user ID matches a predefined authorized ID before allowing access to the expensive AI agent logic.
Binance AI Agent (LangChain Agent n8n node): The core intelligence. This n8n node orchestrates the flow, deciding which API tools to call based on the user's natural language request. It relies on the OpenAI Chat Model n8n node for reasoning.
Simple Memory (LangChain Memory n8n node): Provides short-term context based on the sessionId, allowing for multi-turn conversations within the n8n workflow.
HTTP Request Tool n8n nodes (Multiple): These n8n nodes expose specific Binance API endpoints as tools to the AI agent. Examples include '24h Stats', 'Price (Latest)', and 'Order Book Depth'. The agent calls these n8n nodes dynamically.
Think Tool (LangChain Tool n8n node): Used by the agent for intermediate reasoning and data manipulation, such as cleaning JSON outputs or preparing fields for final formatting within the n8n workflow.
Splits message... (Code n8n node): A vital flow control n8n node that handles the technical constraint of Telegram's message length by programmatically splitting large responses generated by the agent.
Telegram n8n node: The final action n8n node, responsible for sending the formatted, chunked market data report back to the user.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by

With 12 years of experience as a Blockchain Strategist and Web3 Architect, I specialize in bridging the gap between traditional industries and decentralized technologies. My expertise spans tokenized assets, crypto payment integrations, and blockchain-driven market solutions.

Featured*