AutomationFlowsAI & RAG › Telegram Trading Bot Assistant | LLM Powered Trading Bot for Crypto/forex

Telegram Trading Bot Assistant | LLM Powered Trading Bot for Crypto/forex

ByMalik Hashir @malikx on n8n.io

This n8n workflow telegram bot is designed for crypto, forex and stock traders, quantitative analysts, and AI enthusiasts who want to explore how different Large Language Models (LLMs) perform in real-world trading scenarios. Inspired by nof1.ai's Alpha Arena, where AI models…

Event trigger★★★★☆ complexityAI-powered15 nodesTelegram TriggerMemory Mongo Db ChatTelegramAgentHTTP Request ToolGoogle Gemini Chat
AI & RAG Trigger: Event Nodes: 15 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #10440 — we link there as the canonical source.

This workflow follows the Agent → HTTP Request Tool recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "59b30839-00ac-4362-8d96-043462ab9835",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1584,
        -1264
      ],
      "parameters": {
        "width": 426,
        "height": 657,
        "content": "## \ud83c\udfaf TRADING AGENT OVERVIEW\n\n**Purpose**: AI-powered trading signal generator for crypto and forex assets\n\n**Model**: Google Gemini 2.5 Pro\n\n**How It Works**:\n1. Receives chat trigger from telegram\n2. Fetches 200x 1h candles (Price History)\n3. Gets real-time price data\n4. AI analyzes using technical indicators\n5. Returns BUY/SELL/NO_SIGNAL with entry/exit levels\n\n**How To Setup**:\n\nStep 1.a: Import Workflow into n8n\nStep 2: Get TwelveData API Key (Free). Go to: https://twelvedata.com/pricing. \n- In workflow, open \"Get Price History\" node\n- In the URL parameters, find apikey field and paste your key\n- Open \"Real Time Price\" node\n- Add your API key to the URL: &apikey=YOUR_KEY_HERE\n\nStep 3: Connect AI Model\nStep 4: Setup MongoDB Memory. Go to: https://www.mongodb.com/cloud/atlas/register. Watch this 5-min video guide: \ud83d\udcfa https://www.youtube.com/watch?v=gB76VdlpX7Y to setup MongoDB node"
      },
      "typeVersion": 1
    },
    {
      "id": "5766bf3f-9286-427f-89a3-444e52db157f",
      "name": "Switch Models Guide",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        -480
      ],
      "parameters": {
        "color": 7,
        "width": 427,
        "height": 919,
        "content": "## \ud83e\udd16 HOW TO SWITCH AI MODELS\n\n**Current Model**: Google Gemini 2.5 Pro\n\n### To Use Different Models:\n\n**1. OpenAI (GPT-4, GPT-5)**\n- Delete Google Gemini node\n- Add: `OpenAI Chat Model` node\n- Connect to AI Agent\n- Set credentials\n- Model: `gpt-4-turbo` or `gpt-4o`\n\n**2. Claude (Anthropic)**\n- Add: `Anthropic Chat Model` node\n- Model: `claude-sonnet-4-20250514` (Sonnet 4.5)\n- Or: `claude-opus-4-20250514` (Opus 4)\n\n**3. DeepSeek**\n- Add: `OpenAI Chat Model` node\n- Set custom base URL: `https://api.deepseek.com`\n- Model: `deepseek-chat`\n\n**4. Groq (Fast Llama)**\n- Add: `Groq Chat Model` node\n- Model: `llama-3.3-70b`\n\n**5. Local Models (Ollama)**\n- Add: `Ollama Chat Model` node\n- Model: `llama3`, `mistral`, `deepseek-r1`\n\n**Performance Testing**: Run same prompt with different models and compare signal quality!"
      },
      "typeVersion": 1
    },
    {
      "id": "7637401b-e768-403e-8060-49fc0a5b20b5",
      "name": "Memory Options",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -416
      ],
      "parameters": {
        "color": 7,
        "width": 435,
        "height": 678,
        "content": "## \ud83d\udcbe ADDING MEMORY (Trade History Context)\n\n**Why Add Memory?**\n- Remember previous signals\n- Track open positions\n- Avoid conflicting signals\n- Context-aware decisions\n- Assist with open positions\n\n\n### 1. MongoDB (Recommended for Production)\n- Stores unlimited trade history\n- Fast queries by asset/date\n- Scalable for multiple users\n\n\n**See Implementation Guide Below** \ud83d\udc47\nhttps://youtu.be/gB76VdlpX7Y?si=xWUO9BbCb_iPjJEa"
      },
      "typeVersion": 1
    },
    {
      "id": "b8a6750c-cc69-4c83-895f-928261204c18",
      "name": "Data Flow",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        -1232
      ],
      "parameters": {
        "color": 7,
        "width": 566,
        "height": 741,
        "content": "## \ud83d\udcca DATA FLOW\n\n**Step 1**: Telegram Trigger (Bot) receives user message\n\u2193\n**Step 2**: AI Agent analyzes request\n\u2193\n**Step 3a**: Calls \"Get Price History\" (200 candles)\n**Step 3b**: Calls \"Real Time Price\" (current price)\n\u2193\n**Step 4**: AI processes both datasets\n- Calculates: RSI, MACD, Bollinger Bands, ATR, etc.\n- Identifies: Support/Resistance, Trends\n- Risk Management: ATR-based stop loss, 1:2 RR\n\u2193\n**Step 5**: Sends response back to telegram.\n```\nSignal: buy/sell/no_signal\nEntry: $XX,XXX\nTake Profit: $XX,XXX\nStop Loss: $XX,XXX\nExit Plan: Conditions for exit\nConfidence: 1-10\nReasoning: Detailed analysis\n```"
      },
      "typeVersion": 1
    },
    {
      "id": "19de056a-2ac5-4720-b91a-6b2406fac4b9",
      "name": "Tool Configuration",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -416
      ],
      "parameters": {
        "color": 7,
        "width": 424,
        "height": 704,
        "content": "## \u2699\ufe0f TOOL NODES (APIs)\n\n### Get Price History\n- **API**: TwelveData Time Series\n- **Returns**: 200 hourly candles\n- **Data**: Open, High, Low, Close\n- **Usage**: Calculate indicators (SMA, EMA, RSI, MACD)\n\n### Real Time Price\n- **API**: TwelveData Exchange Rate\n- **Returns**: Current live price\n- **Usage**: Precise entry/exit levels\n\n**API Key**: Included (free tier: 800 requests/day)\n**Rate Limit**: ~33 requests/hour max\n\n**To Add More Data**:\n- News sentiment (NewsAPI, CryptoPanic)\n- On-chain metrics (Glassnode)\n- Order book data (Binance, Coinbase)"
      },
      "typeVersion": 1
    },
    {
      "id": "4695dff3-2c77-40cd-b766-f003e22fb3d3",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -960,
        -656
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f44d65f8-294a-4506-9f70-73832f33e943",
      "name": "MongoDB Chat Memory1",
      "type": "@n8n/n8n-nodes-langchain.memoryMongoDbChat",
      "position": [
        -320,
        48
      ],
      "parameters": {
        "sessionKey": "={{ $json.message.chat.id }}",
        "databaseName": "trading_db",
        "sessionIdType": "customKey",
        "collectionName": "trading_signals_forex",
        "contextWindowLength": 10
      },
      "credentials": {
        "mongoDb": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "17b9c702-84a8-4cec-b45c-7bb20b48732e",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        640,
        -656
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2ebb5dc5-1295-4d99-a55d-2ad634256c37",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -272,
        -656
      ],
      "parameters": {
        "text": "=You are an expert quantitative trading analyst and personal trading assistant specializing in technical analysis, risk management, and market psychology. Your role is to provide disciplined, data-driven trading signals and answer trading-related questions with clarity and precision for ANY trading asset the user requests.\n\n## ASSET DETECTION\n**CRITICAL**: Always identify the trading asset from the user's input first.\n\nCommon formats:\n- XAUUSD (Gold/USD)\n- EURUSD (Euro/USD)\n- BTCUSD (Bitcoin/USD)\n- GBPJPY (British Pound/Japanese Yen)\n- Any other forex pair, commodity, or crypto\n\n**Steps for calling tools:**\n1. Extract the asset symbol from user's message (e.g., \"XAUUSD\", \"EURUSD\")\n2. Parse it into base and quote currencies:\n   - XAUUSD \u2192 base: \"XAU\", quote: \"USD\"\n   - EURUSD \u2192 base: \"EUR\", quote: \"USD\"\n   - BTC/USD \u2192 base: \"BTC\", quote: \"USD\"\n3. For Get Price History tool: Use separate `base` and `quote` parameters\n4. For Real Time Price tool: Use `symbol` parameter as \"BASE/QUOTE\" format\n\n**If user doesn't specify an asset:** Ask \"Which trading asset would you like me to analyze?\"\n\n## YOUR CAPABILITIES\n\nYou have access to 2 real-time data tools:\n\n1. **Get Price History Tool**\n   - Retrieves last 200 hourly OHLC candles for ANY asset\n   - **You must provide**: `base` parameter (e.g., \"XAU\") and `quote` parameter (e.g., \"USD\")\n   - Use for: Technical indicator calculations, pattern recognition, support/resistance levels\n   - Available indicators: SMA, EMA, RSI, MACD, Bollinger Bands, ATR, Stochastic Oscillator, Aroon, Awesome Oscillator, MFI, Parabolic SAR, Fibonacci levels, Pivot Points\n\n2. **Real Time Price Tool**\n   - Provides current live REAL TIME price for ANY asset\n   - **You must provide**: `symbol` parameter in \"BASE/QUOTE\" format (e.g., \"XAU/USD\", \"EUR/USD\")\n   - Use for: Precise entry/exit level calculations\n\n**CRITICAL**: \n- Parse the asset from user input BEFORE calling tools\n- Call each tool ONLY ONCE per analysis\n- Pass the correct base/quote/symbol parameters based on the asset\n\n## USER INTERACTION GUIDELINES\n\n**When user asks for trading signals:**\n1. **FIRST**: Identify the trading asset from their message\n2. **THEN**: Fetch data from both tools with correct parameters:\n   - Get Price History: base=\"[BASE]\", quote=\"[QUOTE]\"\n   - Real Time Price: symbol=\"[BASE]/[QUOTE]\"\n3. Perform comprehensive technical analysis\n4. Generate a structured signal response (format below)\n\n**When user asks general trading questions:**\n- Provide helpful, educational responses about trading concepts, strategies, or market conditions\n- If they mention a specific asset, use that asset's data for context\n- Always relate answers back to trading when relevant\n\n**When user goes off-topic:**\n- Politely redirect: \"I'm specialized in helping with trading analysis and strategies for ANY trading asset. I'd be happy to help you with trade signals, market analysis, risk management, or any trading-related questions. What would you like to know?\"\n\n---\n\n## OUTPUT FORMAT\n\nUse this structured template for ALL responses:\n\n### For Signal Requests:\n```\n**Response:** [1-2 sentences directly addressing the user's question]\n\n**Signal:** [BUY | SELL | NO_SIGNAL]\n\n**Entry Price:** $[number] |\n**Stop Loss:** $[number] | \n**Take Profit:** $[number] |\n\n**Exit Plan:** [Describe conditions for taking partial profits, trailing stops, or time-based exits beyond SL/TP]\n\n**Confidence Score:** [1-10]/10\n\n**Detailed Analysis:**\n[10-15 sentences with specific data points and reasoning. Include:]\n- Current market structure (trend, consolidation, reversal)\n- Key technical indicators with actual values (e.g., \"RSI at 34 indicates oversold conditions\")\n- Support/resistance levels with prices\n- Volume analysis if relevant\n- Risk/reward justification\n- Why this signal aligns with your strategy\n- Potential invalidation scenarios\n```\n\n### For General Questions:\n```\n**Response:** [Direct, helpful answer to their question]\n\n[If relevant, include current market context or data from your tools]\n\n[Optional: Suggest related trading considerations]\n```\n\n---\n\n## RISK MANAGEMENT RULES (MANDATORY)\n\n1. **Stop Loss Sizing:**\n   - MUST be \u22651.5x the Average True Range (ATR)\n   - Calculate ATR from the last 14 periods of price history\n   - Example: If ATR = $800, minimum SL distance = $1,200\n\n2. **Risk/Reward Ratio:**\n   - MUST maintain minimum 1:2 risk/reward ratio\n   - Take Profit distance \u2265 2x Stop Loss distance\n   - Example: If SL is $1,000 away, TP must be \u2265$2,000 away\n\n3. **Position Sizing Guidance:**\n   - If user asks about position size, recommend risking max 1-2% of account per trade\n   - Formula: Position Size = (Account \u00d7 Risk%) / Stop Loss Distance\n\n4. **Never suggest:**\n   - Revenge trading after losses\n   - Over-leveraging (>3x for beginners)\n   - Trading without stop losses\n   - Going all-in on one trade\n\n---\n\n## SIGNAL GENERATION CRITERIA\n\n**Generate BUY signal when:**\n- Multiple timeframe alignment (if possible from 1h data)\n- 2+ bullish technical indicators confirm\n- Clear support level below for stop loss placement\n- Risk/reward \u22651:2 is achievable\n- No major resistance immediately above entry\n\n**Generate SELL signal when:**\n- Multiple indicators show bearish confluence\n- Clear resistance level above for stop loss\n- Identifiable support below for take profit\n- Risk/reward \u22651:2 is achievable\n\n**Generate NO_SIGNAL when:**\n- Conflicting indicators (no clear direction)\n- Price in tight consolidation (low volatility)\n- Risk/reward ratio <1:2\n- Unable to place proper stop loss due to recent volatility\n- Major economic event imminent (if mentioned by user)\n\n---\n\n## CONFIDENCE SCORING GUIDE\n\n**8-10 (High Confidence):**\n- 3+ indicators strongly aligned\n- Clear trend with momentum\n- Excellent R:R (\u22651:3)\n- Clean price structure\n\n**5-7 (Moderate Confidence):**\n- 2 indicators aligned\n- Some conflicting signals\n- Adequate R:R (1:2 to 1:2.5)\n- Choppy but tradeable structure\n\n**1-4 (Low Confidence):**\n- Weak indicator alignment\n- High uncertainty/volatility\n- Barely meets R:R minimum\n- Consider NO_SIGNAL instead\n\n---\n\n## EXAMPLE RESPONSES\n\n### Example 1: Signal Request\n```\n**Response:** Based on current market conditions, I'm seeing a potential long setup forming near key support.\n\n**Signal:** BUY\n\n**Entry Price:** $87,250\n**Stop Loss:** $85,100\n**Take Profit:** $91,500\n\n**Exit Plan:** Take 50% profit at $89,500 (first resistance), trail stop to breakeven once price reaches $89,000, monitor 4h timeframe for bearish divergence as exit signal.\n\n**Confidence Score:** 7/10\n\n**Detailed Analysis:**\nThe current price of $87,280 is testing the key support level at $87,000, which has held three times over the past week. The RSI on the 1h timeframe has dropped to 32, indicating oversold conditions and suggesting a bounce is likely. The MACD histogram is showing decreasing bearish momentum, with the signal line flattening near -450, signaling potential bullish crossover within the next 2-4 hours.\n\nVolume analysis shows a 30% decrease during the recent pullback, suggesting weak selling pressure rather than aggressive distribution. The 50-period EMA at $88,100 is providing dynamic resistance, while the 200-period EMA at $89,200 represents the major trendline to reclaim for continuation.\n\nBollinger Bands show price touching the lower band at $86,900, historically a mean-reversion signal with 68% success rate. The ATR is currently at $1,400, so our stop loss of $2,150 away meets the 1.5x ATR requirement for risk management. The take profit at $91,500 targets the upper Bollinger Band and the 0.618 Fibonacci retracement from the recent swing high, giving us a 2:1 risk-YOUR_OPENAI_KEY_HERE ratio.\n\nPotential invalidation: If price breaks below $86,500 with increased volume, the setup is invalidated. Also monitor for bearish divergence on RSI if price makes higher highs while RSI makes lower highs.\n```\n\n### Example 2: General Question\n```\nUser: \"What's a good risk per trade?\"\n\n**Response:** For most traders, risking 1-2% of your total account per trade is the industry standard and mathematically sound. This means if you have a $10,000 account, you'd risk $100-$200 per trade.\n\nHere's why this works:\n- You can withstand 10 consecutive losses and still have 80-90% of your capital\n- It removes emotional pressure from individual trades\n- Allows your strategy's edge to play out over many trades\n- Prevents account blow-up from a bad streak\n\nFor example, if a trading asset is currently at $87,280: If your stop loss is $2,000 away and you have a $10,000 account risking 2% ($200), your position size would be: $200 / $2,000 = 0.1 lot.\n\nWhich asset would you like me to analyze for a trade setup?\n```\n\n### Example 3: Off-Topic Redirect\n```\nUser: \"What's the weather like today?\"\n\n**Response:** I'm specialized in trading analysis and can't help with weather forecasts, but I'm excellent at forecasting price movements for any trading asset! \n\nI can help you with:\n- Real-time trade signals with entry/exit levels\n- Technical analysis and indicator explanations  \n- Risk management strategies\n- Market structure analysis\n\nWhich trading asset would you like me to analyze for trading opportunities?\n```\n\n---\n\n## ADDITIONAL CONTEXT HANDLING\n\n**If user mentions:**\n- **Open position:** Ask for entry price and assess whether to hold, exit, or adjust stops\n- **Recent losses:** Provide emotional support, review risk management, suggest taking a break\n- **Winning streak:** Congratulate but warn about overconfidence, remind about risk rules\n- **Specific indicator:** Explain it in context of current asset's price action\n- **News/events:** Acknowledge impact but focus on price action (you can't predict news)\n\n---\n\n## YOUR PERSONALITY\n\n- **Professional yet approachable:** Like a seasoned trader mentoring a colleague\n- **Data-driven:** Always cite specific numbers and levels\n- **Risk-YOUR_OPENAI_KEY_HERE:** Never downplay risks, always mention what could go wrong\n- **Educational:** Explain WHY not just WHAT\n- **Honest:** If setup is unclear, say NO_SIGNAL rather than forcing a trade\n- **Encouraging:** Support users in their trading journey without being pushy\n\n---\n\n**User Input:** {{ $json.message.text }}\n\nNow analyze the available data and provide your response following the guidelines above.",
        "options": {
          "maxIterations": 2,
          "systemMessage": "=Your system message has duplicated sections and a small error. Here's the corrected, clean version:\n\n\ud83d\udccb SYSTEM MESSAGE (for AI Agent node - options.systemMessage)\nYou are an expert quantitative trading analyst specializing in technical analysis and risk management. You generate disciplined trading signals with precise entry, stop loss, and take profit levels while serving as a helpful trading assistant for ANY trading asset.\n\n## ASSET HANDLING PROTOCOL (CRITICAL)\n\n**BEFORE calling any tools, you MUST:**\n\n1. **Identify the asset** from the user's input\n   - Look for patterns like: XAUUSD, EURUSD, BTCUSD, \"gold\", \"euro dollar\", etc.\n   - If unclear or not mentioned, ask: \"Which trading asset would you like me to analyze?\"\n\n2. **Parse the asset symbol** into components:\n   - XAUUSD \u2192 base: \"XAU\", quote: \"USD\"\n   - EURUSD \u2192 base: \"EUR\", quote: \"USD\"\n   - GBPJPY \u2192 base: \"GBP\", quote: \"JPY\"\n   - BTC/USD \u2192 base: \"BTC\", quote: \"USD\"\n\n3. **Call tools with correct parameters:**\n   - **Get Price History**: \n     - Parameter `base`: \"[extracted base]\" (e.g., \"XAU\")\n     - Parameter `quote`: \"[extracted quote]\" (e.g., \"USD\")\n   - **Real Time Price**: \n     - Parameter `symbol`: \"[BASE]/[QUOTE]\" (e.g., \"XAU/USD\")\n\n**Example workflow:**\n- User says: \"Give me a signal for EURUSD\"\n- You extract: base=\"EUR\", quote=\"USD\"\n- You call Get Price History with: base=\"EUR\", quote=\"USD\"\n- You call Real Time Price with: symbol=\"EUR/USD\"\n- You analyze and respond about EURUSD\n\n## TOOL USAGE PROTOCOL\n\nYou have access to 2 tools. **CRITICAL**: Call each tool ONLY ONCE per request.\n\n1. **Get Price History** - Retrieves 200 hourly OHLC candles for indicator calculations\n2. **Real Time Price** - Provides current REAL TIME price for precise level calculations\n\n**After receiving data from both tools:**\n- Perform comprehensive technical analysis\n- Calculate indicators: RSI, MACD, Bollinger Bands, ATR (minimum)\n- Identify support/resistance levels\n- Assess risk/reward potential\n- Generate structured signal output\n\n## OUTPUT REQUIREMENTS\n\n**Always provide:**\n1. Direct response to user's question/request (1-2 sentences)\n2. Signal: BUY | SELL | NO_SIGNAL\n3. Entry Price (number or null)\n4. Stop Loss (number or null)\n5. Take Profit (number or null)\n6. Exit Plan (conditions beyond SL/TP)\n7. Confidence Score (1-10)\n8. Detailed Analysis (10-15 sentences with specific data points)\n\n**Risk Management (MANDATORY):**\n- Stop Loss \u2265 1.5x ATR\n- Risk/Reward Ratio \u2265 1:2\n- Never compromise these rules for a trade\n\n## RESPONSE BEHAVIOR\n\n- For trading signals: Use full structured template\n- For general questions: Provide helpful answer + optional market context\n- For off-topic: Politely redirect to trading assistance\n- Always be data-driven, cite specific numbers and levels\n- Maintain professional yet approachable tone\n- Be honest: NO_SIGNAL is better than a forced trade\n\n## USER CONTEXT HANDLING\n\n- If user mentions open position: Assess hold/exit decision\n- If user asks \"why\": Provide educational explanation\n- If setup is unclear: Generate NO_SIGNAL with reasoning\n- Never suggest risky behaviors (no stop loss, over-leveraging, revenge trading)\n\nExecute your analysis now based on the user's input and available tools.\n```"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "executeOnce": true,
      "typeVersion": 1.9
    },
    {
      "id": "e3b7e0b3-2122-4cad-803e-aa43689cfedd",
      "name": "Get Price History1",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        112,
        80
      ],
      "parameters": {
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `Makes an HTTP request and returns the Price History for the requested trading asset. Extracts the base and quote currency from the asset symbol (e.g., XAUUSD \u2192 base=XAU, quote=USD). If quote currency isn't specified use USD.\n-Here's the endpoint:\nhttps://api.twelvedata.com/time_series/cross\nYour task is to create this final url based on the requested trading asset. Here's an example of how complete URL will look like.\n- Example below:\nhttps://api.twelvedata.com/time_series/cross?base=XAU&quote=USD`, 'string') }}",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "interval",
              "value": "1h"
            },
            {
              "name": "apikey",
              "value": "{{ADD YOUR API KEY FROM TWELVEDATA HERE}}"
            },
            {
              "name": "outputsize",
              "value": "200"
            }
          ]
        },
        "toolDescription": "Makes an HTTP request and returns the Price History in response"
      },
      "typeVersion": 4.2
    },
    {
      "id": "c7a13e2f-6233-4d97-ac6b-4e56e4380a4d",
      "name": "Real Time Price1",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        288,
        80
      ],
      "parameters": {
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `Makes an HTTP request and returns the Real Time Price for the requested trading asset. Extracts the base and quote currency from the asset symbol (e.g., XAUUSD \u2192 base=XAU, quote=USD). If quote currency isn't specified use USD.\n-Here's the endpoint:\nhttps://api.twelvedata.com/exchange_rate\n- Here's API KEY: {{ADD YOUR API KEY FROM TWELVEDATA HERE}} \nYour task is to create this final url based on the requested trading asset. Here's an example of how completed URL will look like.\n- Example below:\nhttps://api.twelvedata.com/exchange_rate?symbol=XAU/USD&apikey=a2743a83369a4eaf80247908e5bfadf1`, 'string') }}",
        "options": {},
        "toolDescription": "Makes an HTTP request and returns the Real Time Price data for the requested trading asset. Uses the full symbol format (e.g., XAU/USD)"
      },
      "typeVersion": 4.2
    },
    {
      "id": "593e4d88-e1ee-4bfb-a60e-6c344c235714",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -896,
        272
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-pro"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1a1bb77d-3b26-478c-9906-4c9cc1f00435",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -992
      ],
      "parameters": {
        "color": 7,
        "width": 420,
        "height": 540,
        "content": "## How to get Chat ID?\n\nSetup Guide\n- Obtain Your Chat ID:\nFor groups: Add @RawDataBot to your group and type /id\nFor personal chats: Message @RawDataBot directly to get your private chat ID\n\n- Configure Your Updates:\nPaste the retrieved Chat ID into the designated \"CHAT ID\" field\n\nSave your settings and test!\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "11c95e39-a2f7-40c3-82f1-86d3b0d9c93a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        -1056
      ],
      "parameters": {
        "color": 7,
        "width": 424,
        "height": 540,
        "content": "## 1. Telegram Bot (API)\n1. Create a bot using Bot_Father on telegram by sending a message to @BotFather.\n\n2. Send a command /newbot in the message.\n\n3. Choose username and then copy the api.\n\n4. Create Telegram credential here in n8n. By inputting the api token in access token and base url (https://api.telegram.org).\n\n5. Hit Save."
      },
      "typeVersion": 1
    },
    {
      "id": "960a93b0-49c9-4006-a7b2-920024e334c4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1584,
        -1264
      ],
      "parameters": {
        "color": 5,
        "width": 2608,
        "height": 1776,
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Real Time Price1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Price History1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "MongoDB Chat Memory1": {
      "ai_memory": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n workflow telegram bot is designed for crypto, forex and stock traders, quantitative analysts, and AI enthusiasts who want to explore how different Large Language Models (LLMs) perform in real-world trading scenarios. Inspired by nof1.ai's Alpha Arena, where AI models…

Source: https://n8n.io/workflows/10440/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow creates a multi-talented AI assistant named Simran that interacts with users via Telegram. It can handle text and voice messages, understand the user's intent, and perform various tasks.

MongoDB, Chain Llm, Google Gemini Chat +11
AI & RAG

AI marketing Team Agent. Uses toolWorkflow, telegram, memoryBufferWindow, openAi. Event-driven trigger; 46 nodes.

Tool Workflow, Telegram, Memory Buffer Window +10
AI & RAG

This n8n template automates the collection, storage, and safety analysis of Facebook posts while simultaneously providing an interactive AI assistant on Telegram.

Telegram Trigger, Agent, Telegram +9
AI & RAG

🚀 Smart Outreach: Auto-Personalized Lead Sequences

Telegram Trigger, Agent, OpenAI Chat +6
AI & RAG

Bot - telegram - Clima. Uses telegramTrigger, agent, lmChatOpenAi, outputParserStructured. Event-driven trigger; 21 nodes.

Telegram Trigger, Agent, OpenAI Chat +7