{
  "id": "9Ptu9f5NDOyBSszJ",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI Stock Tracking Agent",
  "tags": [],
  "nodes": [
    {
      "id": "16fe6f90-0ada-4b3a-bb77-db96f289861f",
      "name": "Convert to Stock Symbol",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        304,
        128
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-nano",
          "cachedResultName": "GPT-4.1-NANO"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "content": "=Convert this stock into a stock symbol. In the output, just give me the stock symbol, no other explanation.\n\nStock Name: {{ $json.message.text }}"
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "61c58606-53db-413b-a0b2-6a2597e69d43",
      "name": "News Sentiment Analyzer",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1680,
        640
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "content": "=Analyze this following news and give your result for just 1 stock -\n\n{{ JSON.stringify($json.articles) }}"
            },
            {
              "role": "system",
              "content": "=You are a financial market impact analyst. Your job is not to analyze the emotional tone of the text, but to predict the likely short-term impact on the stock price.\n\nRules for Analysis:\n1. MARKET IMPACT vs. EMOTION: Distinguish between news that is \"bad\" for society (e.g., layoffs, lawsuits) but potentially \"good\" or \"neutral\" for the stock price (e.g., cost reduction, settlement priced in).\n2. SCORE: Assign a score from -1.0 (Strong Sell Pressure) to +1.0 (Strong Buy Pressure).\n   - 0 is for neutral news or noise.\n   - High scores (>0.7) require concrete catalysts (earnings beat, new product, upgrades).\n3. RATIONALE: Be extremely concise. Focus on the \"Why\" regarding price movement.\n\nIn the output, give me these information only-\n\n- Category (\"Bullish\" or \"Bearish\" or \"Neutral\")\n- Score (number between -1.0 & 1.0)\n- Rationale (max 1 sentence explaining the price impact)"
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "345ff17e-fc3c-445a-aaa5-005e2cb1bbfa",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2592,
        624
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "3b5d85ab-6a01-486d-b6c0-fb0d56e05b3e",
      "name": "AI Stock Tracking",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2688,
        400
      ],
      "parameters": {
        "text": "=Analyze this stock: {{ $('Convert to Stock Symbol').item.json.output[0].content[0].text }}\n\nTechnical Data: \n{{ JSON.stringify($json.data[0].data) }}\n\nNews Sentiment:\n{{ $json.data[1].output[0].content[0].text }}\n",
        "options": {
          "systemMessage": "=You are a Senior Quantitative Strategist at a top-tier hedge fund. Your goal is to synthesize technical data, news sentiment, and live market context to produce a high-probability trade setup.\n\n### OPERATIONAL PROTOCOL (Must Follow Order):\n\n1. **VISUAL CONFIRMATION (Mandatory):**\n   - You MUST use the `Get Chart Image` tool to render the 1-week chart.\n   - Analyze the visual trend to confirm your numeric data.\n\n2. **SYNTHESIS & DECISION:**\n   - **Bullish Signal:** Requires Price > 20-Day MA AND (News Score > 0.2 OR Live Sentiment is Positive).\n   - **Bearish Signal:** Requires Price < 20-Day MA AND (News Score < -0.2 OR Live Sentiment is Negative).\n   - **Neutral/Hold:** If Technicals conflict with Sentiment (e.g., Uptrending price but bad news), default to HOLD unless the risk/reward is > 1:3.\n\n3. **RISK MANAGEMENT:**\n   - Stop Loss: MUST be below Support (for Buy) or above Resistance (for Sell).\n   - Target: Must offer at least 2.0x reward relative to risk.\n\n### OUTPUT FORMAT (Strict Markdown):\nDo not output generic text. Use this exact structure:\n\n##Analysis: [Symbol]\n**The Verdict:** [BUY / SELL / HOLD] (Confidence: X/10)\n\n**Rationale:**\n* **Technical Reality:** [1 sentence on the trend/MAs]\n* **Sentiment Context:** [1 sentence integrating NewsAPI + Live Perplexity findings]\n* **Conflict Resolution:** [Explain how you weighed conflicting signals, if any]\n\n**Trade Setup:**\n* **Entry Zone:** [Price]\n* **Stop Loss:** [Price]\n* **Target:** [Price]\n* **Risk/Reward:** [Ratio]\n\nCRITICAL FORMATTING RULES (MANDATORY):\n1.\tABSOLUTELY NO MARKDOWN: You are strictly forbidden from using asterisks (* or ) or hashes (# or ##) anywhere in your output.\n2.\tSTRICT TELEGRAM HTML ONLY: You may ONLY use <b> for bold, <i> for italics, and <a> for links.\n3.\tBANNED HTML TAGS: You must NEVER use <img>, <ul>, <ol>, <li>, or <br> tags. Using these will crash the system.\n4.\tLISTS & SPACING: Use standard newlines (\\n) for line breaks. For lists, use the standard text bullet character (\u2022 ) instead of HTML lists.\n5.\tTHE CHART LINK: You MUST extract the raw URL string provided by the Get Chart Image tool and place it inside a hyperlink at the very bottom of your response exactly like this: <a href=\"[INSERT EXACT URL HERE]\">View Chart</a>.\n\n\n[The Chart Image Tool output will appear here automatically]"
        },
        "promptType": "define"
      },
      "typeVersion": 3.1
    },
    {
      "id": "d698a5d0-852e-4336-97ac-29e7d08b82f8",
      "name": "Get Chart Image for Stock",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2880,
        624
      ],
      "parameters": {
        "url": "https://api.chart-img.com/v2/tradingview/advanced-chart/storage",
        "method": "POST",
        "options": {
          "response": {
            "response": {}
          }
        },
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "symbol",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `Set TradingView Symbol.\nFormat - EXCHANGE:SYMBOL.\n\nExample - NASDAQ:MSFT`, 'string') }}"
            },
            {
              "name": "interval",
              "value": "1W"
            }
          ]
        },
        "toolDescription": "Use this tool to get Chart Image for a stock",
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "V9KPuD5DH84BV3VhggenZ3ixeaMgfuxs7WXiR1p0"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "cc8463c9-2b5e-4939-952f-5e695b3c0239",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -336
      ],
      "parameters": {
        "color": "#E1C7C7",
        "width": 416,
        "height": 624,
        "content": "# Step 1: Telegram Stock Request Trigger\n\n### What This Node Does\nThis is the entry point of the workflow.\n\nIt waits for users to send a message in Telegram containing a stock/company name.\n\n### How It Works\n- Listens for incoming Telegram messages\n- Captures the user message\n- Starts the workflow automatically\n\n### Example\nUser sends:\n\n```text\nApple\n```\n\nWorkflow begins instantly."
      },
      "typeVersion": 1
    },
    {
      "id": "6da5c501-ef2b-4c3d-8138-af6ecb4922a5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -320
      ],
      "parameters": {
        "color": "#D397B1",
        "width": 336,
        "height": 608,
        "content": "# Step 2: Convert to Stock Symbol\n\n### What This Node Does\nUses OpenAI to convert a company name into a valid stock ticker symbol.\n\n### How It Works\nThe AI:\n- Reads the company name\n- Understands the intended stock\n- Returns only the stock ticker\n\n### Example\n\n| User Input | AI Output |\n|---|---|\n| Apple | AAPL |\n| Tesla | TSLA |\n| Nvidia | NVDA |\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ccf4dd91-efb7-48ed-bf58-27bed3ec8c9b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -352
      ],
      "parameters": {
        "color": "#CE95D6",
        "width": 512,
        "height": 416,
        "content": "# Step 3: Fetch 4H Market Data\n\n### What This Node Does\nFetches 4-hour interval stock data from the TwelveData API.\n\n### Data Returned\n- Open Price\n- High Price\n- Low Price\n- Close Price\n- Volume\n\n### Why This Node Matters\nHelps analyze:\n- Short-term momentum\n- Intraday trends\n- Swing trading opportunities"
      },
      "typeVersion": 1
    },
    {
      "id": "6557aa7c-e22c-4e0c-9c76-8f2e39954de6",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        80
      ],
      "parameters": {
        "color": "#B0A3F0",
        "width": 416,
        "height": 352,
        "content": "# Step 4: Fetch Daily Market Data\n\n### What This Node Does\nRetrieves daily stock candles from TwelveData API.\n\n### Why This Node Matters\nDaily candles help identify:\n- Medium-term trends\n- Support and resistance\n- Trend direction"
      },
      "typeVersion": 1
    },
    {
      "id": "0b234b10-5a1c-472c-9628-e523754b7763",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        448
      ],
      "parameters": {
        "color": "#B9E8EF",
        "width": 448,
        "height": 336,
        "content": "# Step 5: Fetch Weekly Market Data\n\n### What This Node Does\nFetches weekly timeframe market data.\n\n### Why This Node Matters\nWeekly charts help analyze:\n- Long-term market structure\n- Major breakouts\n- Investor sentiment\n- Macro trend direction"
      },
      "typeVersion": 1
    },
    {
      "id": "7069fc7e-4e90-4dc3-ac43-7101b5170686",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        -176
      ],
      "parameters": {
        "color": "#CCCBA3",
        "width": 304,
        "height": 592,
        "content": "# Step 6: Merge Multi-Timeframe Data\n\n### What This Node Does\nCombines all chart timeframe data into one stream.\n\n### Inputs Combined\n- 4h chart data\n- 1day chart data\n- 1week chart data\n\n### Why This Node Matters\nCreates a unified dataset for AI analysis."
      },
      "typeVersion": 1
    },
    {
      "id": "d7236aff-5877-41ea-ada1-40683a46fb0c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -32
      ],
      "parameters": {
        "color": "#F2C1A1",
        "width": 352,
        "height": 448,
        "content": "# Step 7: Structure Technical Dataset\n\n### What This Node Does\nOrganizes all merged stock data into a single structured object.\n\n### Why This Node Matters\nMakes it easier for downstream AI nodes to process technical data efficiently.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "afe56755-32bf-4774-9746-ce6ca34bd177",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        800
      ],
      "parameters": {
        "color": "#C9E89C",
        "width": 416,
        "height": 384,
        "content": "# Step 8: Fetch Stock News\n\n### What This Node Does\nFetches recent news articles related to the stock using NewsAPI.\n\n### Data Collected\n- Headlines\n- Article descriptions\n- Sources\n- Publication dates\n\n### Why This Node Matters\nMarket news strongly affects stock movement and volatility."
      },
      "typeVersion": 1
    },
    {
      "id": "a32a768b-f7fb-493c-9508-f564178088cb",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        464
      ],
      "parameters": {
        "color": "#FFBDF9",
        "width": 576,
        "height": 416,
        "content": "# Step 9: News Sentiment Analyzer\n\n### What This Node Does\nUses OpenAI to evaluate how recent news may impact the stock price.\n\n### AI Analysis Includes\n- Bullish sentiment\n- Bearish sentiment\n- Neutral sentiment\n- Confidence score\n- Market rationale\n\n### Why This Node Matters\nTransforms raw news into actionable trading insight."
      },
      "typeVersion": 1
    },
    {
      "id": "92ba7826-8992-496d-b3f8-a5f15953d24b",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2032,
        96
      ],
      "parameters": {
        "color": "#D3D2F9",
        "width": 288,
        "height": 464,
        "content": "# Step 10: Merge Technical and News Data\n\n### What This Node Does\nCombines:\n- Technical market data\n- News sentiment analysis\n\ninto one unified AI context."
      },
      "typeVersion": 1
    },
    {
      "id": "10210d87-0df6-41d9-9471-193f8d53a070",
      "name": "Merge Technical and News Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        2128,
        400
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "cc959ff5-3555-46ba-b1b5-269894572142",
      "name": "Final AI Context Builder",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2432,
        400
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "f43284a7-d1a8-446c-8c84-63f64762ec5f",
      "name": "Structure Technical Dataset",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1680,
        240
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "f9bdfccc-0afe-444c-876e-9396b51cd4db",
      "name": "Telegram Stock Request Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -16,
        128
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "bcec4a67-0e7f-41c7-8c29-ecab46e8a442",
      "name": "Fetch 4H Market Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        864,
        -80
      ],
      "parameters": {
        "url": "https://api.twelvedata.com/time_series",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "symbol",
              "value": "={{ $json.output[0].content[0].text }}"
            },
            {
              "name": "interval",
              "value": "4h"
            },
            {
              "name": "apikey",
              "value": "3edbe0fcf6ab445db3587d762f902f7b"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "7f5b7539-27c8-4039-b6f0-5c72c6e2ff03",
      "name": "Fetch Daily Market Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1008,
        240
      ],
      "parameters": {
        "url": "https://api.twelvedata.com/time_series",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "symbol",
              "value": "={{ $json.output[0].content[0].text }}"
            },
            {
              "name": "interval",
              "value": "1day"
            },
            {
              "name": "apikey",
              "value": "3edbe0fcf6ab445db3587d762f902f7b"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "0576b353-4f74-472d-afbc-24759245ef97",
      "name": "Fetch Weekly Market Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1136,
        592
      ],
      "parameters": {
        "url": "https://api.twelvedata.com/time_series",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "symbol",
              "value": "={{ $json.output[0].content[0].text }}"
            },
            {
              "name": "interval",
              "value": "1week"
            },
            {
              "name": "apikey",
              "value": "3edbe0fcf6ab445db3587d762f902f7b"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "189ebe6a-7e09-4da6-9f88-814c61013ae2",
      "name": "Merge Multi-Timeframe Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        1392,
        224
      ],
      "parameters": {
        "numberInputs": 3
      },
      "typeVersion": 3.2
    },
    {
      "id": "4694644d-9f66-413b-b291-de8928584297",
      "name": "Fetch Stock News",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1248,
        928
      ],
      "parameters": {
        "url": "https://newsapi.org/v2/everything",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ $json.output[0].content[0].text }}"
            },
            {
              "name": "from",
              "value": "={{ $now.minus({ days: 7 }).toFormat('yyyy-MM-dd') }}"
            },
            {
              "name": "sortBy",
              "value": "popularity"
            },
            {
              "name": "apiKey",
              "value": "d404e1e4ddde4e8f84a93a0790a97bd5"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "9cfdf00d-e352-41d3-898b-af26f564f22c",
      "name": "Send Telegram Analysis Report",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3072,
        400
      ],
      "parameters": {
        "text": "={{ $json.output.replace(/<img[^>]*>/gi, '') }}",
        "chatId": "={{ $('Telegram Stock Request Trigger').item.json.message.chat.id }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b00acc1f-7f84-4c5d-9848-3eba74322413",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2336,
        208
      ],
      "parameters": {
        "color": "#C1ECD8",
        "width": 304,
        "height": 352,
        "content": "# Step 11: Final AI Context Builder\n\n### What This Node Does\nStructures all combined stock intelligence into a clean dataset."
      },
      "typeVersion": 1
    },
    {
      "id": "d603c1bf-2a82-4e83-b744-96e6761b4889",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2656,
        -128
      ],
      "parameters": {
        "color": "#F0E9B7",
        "width": 304,
        "height": 688,
        "content": "# Step 12: AI Stock Tracking\n\n### What This Node Does\nActs as the master AI trading analyst.\n\n### AI Responsibilities\n- Analyze technical data\n- Analyze news sentiment\n- Detect bullish/bearish setups\n- Calculate trade entries\n- Suggest stop losses\n- Generate price targets\n- Determine risk/reward ratio\n\n### Output Includes\n- BUY / SELL / HOLD verdict\n- Confidence score\n- Trade setup\n- Risk analysis\n- Chart link"
      },
      "typeVersion": 1
    },
    {
      "id": "15bfd7b8-25a3-4e1d-b09e-3fdf83246cd3",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2800,
        608
      ],
      "parameters": {
        "color": "#F0E9B7",
        "height": 336,
        "content": "\n\n\n\n\n\n\n\n\n\n\nGenerates a visual TradingView chart image using Chart-IMG API.\n\n### Features\n- Professional stock charts\n- Weekly timeframe visualization\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cbbb46a6-5438-4b6b-af15-22cdd068311a",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2976,
        0
      ],
      "parameters": {
        "color": "#FFD6F6",
        "width": 352,
        "height": 560,
        "content": "# Step 13: Send a text message\n\n### What This Node Does\nSends the final AI-generated stock analysis back to the Telegram user.\n\n### Final Output Includes\n- Trading verdict\n- Confidence score\n- Entry zone\n- Stop loss\n- Target price\n- Risk/reward ratio\n- Chart link"
      },
      "typeVersion": 1
    },
    {
      "id": "0b5609b3-7ade-46b2-9028-87319baddb59",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3360,
        16
      ],
      "parameters": {
        "color": "#FFFFFF",
        "width": 896,
        "height": 560,
        "content": "# Telegram Output\n![image](\nhttps://cdn.uploadtourl.com/e7638dcb-ddb5-4407-b078-cefa0749e508_file.png#full-width)"
      },
      "typeVersion": 1
    },
    {
      "id": "54e3431e-ffdd-41b1-a6e8-9884fc0e3699",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -560
      ],
      "parameters": {
        "color": "#D7CAE3",
        "width": 912,
        "height": 192,
        "content": "# Workflow Overview\n\n### This AI-powered workflow turns Telegram into a smart stock analysis assistant.  \n### Users send a stock name, and the workflow automatically converts it into a stock symbol, fetches multi-timeframe market data, analyzes recent news sentiment using AI, and generates a professional trading decision.  \n### Finally, it sends a complete BUY, SELL, or HOLD analysis report with chart links directly back to Telegram."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "Ur6cpCKVsvJkj7zt",
    "timeSavedMode": "fixed",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "5291b129-686e-4301-8882-93c3ffef1121",
  "connections": {
    "Fetch Stock News": {
      "main": [
        [
          {
            "node": "News Sentiment Analyzer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Stock Tracking": {
      "main": [
        [
          {
            "node": "Send Telegram Analysis Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Stock Tracking",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch 4H Market Data": {
      "main": [
        [
          {
            "node": "Merge Multi-Timeframe Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Stock Symbol": {
      "main": [
        [
          {
            "node": "Fetch 4H Market Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Daily Market Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Weekly Market Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Stock News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Daily Market Data": {
      "main": [
        [
          {
            "node": "Merge Multi-Timeframe Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "News Sentiment Analyzer": {
      "main": [
        [
          {
            "node": "Merge Technical and News Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Fetch Weekly Market Data": {
      "main": [
        [
          {
            "node": "Merge Multi-Timeframe Data",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Final AI Context Builder": {
      "main": [
        [
          {
            "node": "AI Stock Tracking",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Chart Image for Stock": {
      "ai_tool": [
        [
          {
            "node": "AI Stock Tracking",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Merge Multi-Timeframe Data": {
      "main": [
        [
          {
            "node": "Structure Technical Dataset",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structure Technical Dataset": {
      "main": [
        [
          {
            "node": "Merge Technical and News Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Technical and News Data": {
      "main": [
        [
          {
            "node": "Final AI Context Builder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Stock Request Trigger": {
      "main": [
        [
          {
            "node": "Convert to Stock Symbol",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}