This workflow corresponds to n8n.io template #13816 — we link there as the canonical source.
This workflow follows the Agent → HTTP Request 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 →
{
"name": "Telegram Chat Bot",
"tags": [],
"nodes": [
{
"id": "af3f3bd0-31c5-4ca9-870d-2fa6c757d5f3",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
2768,
-1808
],
"parameters": {
"color": 7,
"width": 1328,
"height": 960,
"content": "## Telegram Chat Bot\n\n## How it works\nThis workflow monitors Telegram channels and direct messages for trading signals. When a message arrives, it routes through message type detection, transcribes voice messages if needed, and sends the content to AI analysis for intelligent action routing.\n\n## Setup steps\n- **(Required)** Create Telegram bot by messaging @BotFather and get your auth token\n- **(Required)** Add the auth token to \"Telegram Channel Listener\" node credentials\n- **(Optional)** To monitor a specific channel: set channel_id in \"Channel Check\" node and add bot as admin with NO permissions"
},
"typeVersion": 1
},
{
"id": "7aeb44f6-0aad-474b-a43c-aa8a94205f77",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
4112,
-1808
],
"parameters": {
"color": 7,
"width": 464,
"height": 960,
"content": "## Global Settings\n\n## How it works\nCentralizes workflow configuration including strategy ID, security whitelist, session tracking, and message input. All downstream nodes reference these global settings for consistent execution context.\n\n## Setup steps\n- **(Required)** Set strategy_id by copying it from your AlphaInsider strategy URL (e.g., \"niAlE-cMI8TdsYQllZLmf\")\n- **(Optional)** Set whitelist array with \"STOCK:EXCHANGE\" format to restrict tradeable securities, or leave as [] for no restrictions"
},
"typeVersion": 1
},
{
"id": "f0c4e73f-8a54-439a-8923-0d7f779f18dc",
"name": "Transcribe Voice Message",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
3920,
-1232
],
"parameters": {
"options": {},
"resource": "audio",
"operation": "transcribe"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "cf8dbe6c-8e07-40fc-9287-bb6951f3bd90",
"name": "Get Voice Message",
"type": "n8n-nodes-base.telegram",
"position": [
3728,
-1232
],
"parameters": {
"fileId": "={{ $json.message.voice.file_id }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "5a27bb57-2bbb-4ef4-b760-78f9402bc601",
"name": "Channel Check",
"type": "n8n-nodes-base.if",
"position": [
3216,
-1248
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c067a04e-0d70-496e-ab7e-0938ebb8170b",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.channel_post.chat.id }}",
"rightValue": -1001234567890
}
]
}
},
"typeVersion": 2.3
},
{
"id": "b495763a-8f5a-433d-8e82-00a706da455f",
"name": "Global Settings",
"type": "n8n-nodes-base.set",
"position": [
4288,
-1376
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cc0b4d35-1e3e-416a-8891-2fcd9269cec2",
"name": "session_id",
"type": "number",
"value": "={{ $('Message Details').item.json.session_id }}"
},
{
"id": "8655d162-6ff5-484d-a5be-0800b06a4e1b",
"name": "input",
"type": "string",
"value": "={{ $json.message.text }}{{ $json.text }}"
},
{
"id": "a1540549-e689-4756-8e68-982f5f64066c",
"name": "strategy_id",
"type": "string",
"value": ""
},
{
"id": "9023a0a4-2ab6-4680-b55c-708e55647da8",
"name": "whitelist",
"type": "array",
"value": "[]"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "56a10c97-c688-4e0d-a1c7-2a7df688473e",
"name": "Message Details",
"type": "n8n-nodes-base.set",
"position": [
3392,
-1360
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "4e5beb76-1e15-4199-b9d0-cb14b6263a84",
"name": "session_id",
"type": "number",
"value": "={{ $json.message.chat.id }}{{ $json.channel_post.chat.id }}"
},
{
"id": "71eb3d1b-2250-49d2-8792-18de9b9a49e6",
"name": "message",
"type": "object",
"value": "={{ $json.message || $json.channel_post }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "d30047d3-dcba-452c-9697-16b864a9c61b",
"name": "Message Details Check",
"type": "n8n-nodes-base.switch",
"position": [
3568,
-1360
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Text Message",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "89180e46-b112-4965-b085-e37f88abea2b",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.text }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "Voice Message",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "2a453750-99e7-4b10-a96d-9303ea047ffc",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.voice }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.4
},
{
"id": "9412299e-1546-4349-80e5-976bb9c57d5e",
"name": "Message Check",
"type": "n8n-nodes-base.switch",
"position": [
3040,
-1344
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Direct Message",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "72265a24-c099-4e1a-a495-f1b60640982e",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "Channel Post",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9c2971fd-1980-4dd9-b10b-948e67532e76",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.channel_post }}",
"rightValue": "-1+1234567890"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.4
},
{
"id": "1e041af0-14fa-4cf8-9041-d389c2816bab",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
4592,
-1808
],
"parameters": {
"color": 7,
"width": 1616,
"height": 960,
"content": "## AlphaInsider Position Manager\n\n## How it works\nFetches current portfolio positions from AlphaInsider, calculates allocation percentages with leverage, then uses OpenAI GPT-5.2-pro to analyze trading signals and route to three actions: execute trades, create audience posts, or provide direct Q&A responses.\n\n## Setup steps\n- **(Required)** Get AlphaInsider API token from developer settings (click n8n button). Add to \"Get Positions\", \"Create Post\", and \"Create Orders\" nodes\n- **(Required)** Get OpenAI API key and add to \"OpenAI Model\" and \"Transcribe Voice Message\" nodes"
},
"typeVersion": 1
},
{
"id": "d4cbabc5-41c4-48ce-9db9-de0f2f5f4794",
"name": "Get Positions",
"type": "n8n-nodes-base.httpRequest",
"position": [
4720,
-1376
],
"parameters": {
"url": "https://alphainsider.com/api/getPositions",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth",
"queryParameters": {
"parameters": [
{
"name": "strategy_id",
"value": "={{ $('Global Settings').item.json.strategy_id }}"
}
]
}
},
"credentials": {
"httpBearerAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "2056d925-15d7-43ea-8705-041c8857a85d",
"name": "Parse Position Percents",
"type": "n8n-nodes-base.code",
"position": [
4992,
-1376
],
"parameters": {
"jsCode": "// Get http response input from AI\nconst positions = $input.first().json.response;\n\ntry {\n // Process positions to calculate percentages\n if (positions && Array.isArray(positions)) {\n // Calculate total strategy value from positions\n let strategyValue = 0;\n for (const position of positions) {\n const amount = parseFloat(position.amount);\n const isAsset = amount >= 0;\n const currentPrice = parseFloat(isAsset ? position.bid : position.ask);\n strategyValue += amount * currentPrice;\n }\n\n if(strategyValue <= 0) throw new Error('Strategy value must be greater than 0.');\n\n // Calculate percentage for each position\n const filteredPositions = positions.filter((position) => `${position.stock}:${position.provider}`.toUpperCase() !== 'USD:ALPHAINSIDER');\n const parsedPositions = filteredPositions.map((position) => {\n const amount = parseFloat(position.amount);\n const isAsset = amount >= 0;\n const currentPrice = parseFloat(isAsset ? position.bid : position.ask);\n const positionPercent = Math.abs((amount * currentPrice) / strategyValue);\n\n return {\n stock_id: position.stock_id,\n stock: position.stock,\n exchange: position.exchange,\n action: (isAsset ? 'long' : 'short'),\n percent: positionPercent\n };\n });\n\n //return parsed positions\n return {positions: parsedPositions};\n }\n \n return {positions: []};\n \n} catch (error) {\n throw {\n error: 'Failed to fetch positions',\n message: error.message,\n input: positions\n };\n}"
},
"typeVersion": 2,
"alwaysOutputData": false
},
{
"id": "988e2959-b203-4671-89bc-7d5791e74ae3",
"name": "Parse Stock Allocations",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
5264,
-1376
],
"parameters": {
"text": "=Input:\n{{ $('Global Settings').item.json.input }}\n\nWhitelist:\n{{ $('Global Settings').item.json.whitelist }}\n\nPositions:\n{{ JSON.stringify($json.positions) }}",
"options": {
"systemMessage": "You are an expert trading signal AI. Your job is to analyze any text (tweets, Telegram messages, transcripts, news, etc.) and determine the user's intention: making a trade, posting to an audience, or asking questions directly. Based on this, you generate appropriate responses including trade allocations, post content, or direct answers.\n\n### Inputs:\n- Input: [Text]\n- Whitelist (ONLY these securities are allowed): [whitelist]\n- Positions: [JSON array of objects]\n\n### Rules (Critical):\n\n**ACTION TYPES:**\n1. **action = 'trade'**: User intends to make a trade. Populate allocations array with trade information.\n2. **action = 'post'**: User is making a post to their audience (no trade intention) OR user is directly asking the agent to make a post on their behalf. Populate the `post` object with:\n - **User-authored posts**: `description` contains exact user message, optional `url` for main URL\n - **Agent-generated posts**: `description` contains agent-created technical analysis or commentary based on user's request and current market/position information\n3. **action = 'none'**: User is asking questions directly or input is unrelated/not useful. Answer questions in `message` or explain why no action was taken.\n\n**TRADING RULES (when action = 'trade'):**\n1. If whitelist input is not empty, ONLY use securities that appear in the whitelist. Otherwise figure out the STOCK and EXCHANGE and convert for use on stock_Id. The whitelist is optional and can be empty, which indicates no restrictions on securities (allow all stocks or cryptocurrencies, but adhere to type consistency as per other rules).\n- STOCK: Stock symbol representing the security of crypto asset (stock examples: SPY, AAPL) (cryptocurrency examples: BTC, ETH).\n- EXCHANGE: Only exchanges available are COINBASE (cryptocurrency), NYSE (stock), and NASDAQ (stock).\n2. Positions input is a JSON array of currently held percentage allocation of stock/cryptocurrency positions. Positions will never contain both cryptocurrency and stock positions; only one type or the other.\n- stock_id: The stock ID that is based on `STOCK:EXCHANGE`.\n- action: The current direction the stock is being held. (eg: long = holding a long position in the stock, short = holding a short position in the stock)\n- percent: 0 < x <= 2; x = positions percent w/ leverage. If x <= 1, the strategy is not in leverage. 1 < x <= 2, the strategy is leverage up to 200%. This is represented as a decimal value.\n- **IMPORTANT**: Make sure to include the currently held position percentage allocations that you would keep with the newly created allocations. Drop current positions based on your calculated preference.\n3. Map common names \u2192 exact stock_id:\n Tesla \u2192 TSLA:NASDAQ, Microsoft \u2192 MSFT:NASDAQ, Nvidia \u2192 NVDA:NASDAQ, Bitcoin \u2192 BTC:COINBASE, MicroStrategy \u2192 MSTR:NASDAQ, etc.\n **IMPORTANT**: If you don't know the exact STOCK symbol or EXCHANGE for a security mentioned in the input text, you MUST use the \"Search Stocks\" tool to look it up from AlphaInsider before creating allocations. Do not guess or assume - always verify unfamiliar securities using the tool.\n4. Be conservative. Only trigger trades when there is a **clear** long, short, or close signal.\n - Strong Long: buy, bullish, loading up, moon, buying more, strong buy, undervalued\n - Strong Short: sell, dumping, overvalued, take profit, bearish, exiting\n - Strong Close: take profit, exiting, holding cash, getting out, trade closed, closing positions.\n5. **CRITICAL**: Distinguish between different types of user input:\n **Trading Signals (action = 'trade')** - Look for ACTION words or INTENT:\n - Direct action verbs: \"buying\", \"selling\", \"going long\", \"going short\", \"loading up\", \"dumping\", \"taking profit\", \"closing\", \"exiting\", \"adding\", \"trimming\"\n - Intent phrases: \"I'm in\", \"I'm out\", \"getting in\", \"getting out\", \"entering\", \"accumulating\"\n - Position statements: \"long on X\", \"short on X\", \"holding X\", \"sold my X\"\n - Recommendations with conviction: \"buy X now\", \"time to sell\", \"take profit here\", \"strong buy\", \"strong sell\"\n - Combined technical + action: \"RSI oversold, buying\", \"broke resistance, going long\", \"hit stop loss, closing position\"\n\n **Posts to Audience (action = 'post')** - User is communicating with their audience OR requesting the agent to post on their behalf:\n - **User-authored**: Broadcasting information, opinions, or analysis to followers; sharing news, updates, or commentary; may include URLs to articles, charts, or resources\n - **Agent-generated**: User directly asks agent to \"make a post\", \"post about\", \"share an update\", etc. - agent creates technical analysis or commentary based on provided information, current positions, or market data\n - No explicit trading intention for themselves in either case\n - **CRITICAL** ASCII ONLY: All post content in the `description` field MUST contain only ASCII characters (character codes 0-127). Strip or replace any non-ASCII characters (emojis, special unicode characters, accented letters, etc.) before including in the post. If the entire input is non-ASCII or becomes empty after filtering, set action = 'none' and explain in the message field.\n\n **Direct Conversation (action = 'none')** - User talking directly to the agent:\n - Pure observation: \"RSI is at 30\", \"MACD crossed above signal\", \"broke resistance at $100\"\n - Chart descriptions: \"forming a cup and handle\", \"looks like a bullish pattern\", \"support at $50\"\n - Trading-related questions: \"What are my current positions?\", \"What do you think about X stock?\", \"How much am I allocated?\"\n - **OFF-TOPIC INPUT**: Questions or statements NOT related to trading, stocks, or cryptocurrency (e.g., \"What's the weather?\", \"What should I do today?\", \"Tell me a joke\", general life advice, entertainment, etc.)\n - **CRITICAL**: Do NOT attempt to answer off-topic questions. For any input unrelated to trading/stocks/crypto, respond in the message field with a polite decline stating the agent's scope is limited to trading signals, stock/cryptocurrency analysis, and position management.\n - Unclear input that cannot be categorized\n **When in doubt, assume it's action = 'none'** - Only set action = 'trade' if at least 50% certain it's a trading signal\n6. If the signal is weak, neutral, or ambiguous \u2192 set action = 'none'\n7. **IMPORTANT** Percentages: Use decimals between 0 and 2.0 (e.g., 1.5 for 150% of buying power/leverage). The sum of all \"percent\" values across allocations MUST NOT exceed 2.0 (200% or 2x leverage).\n - For single asset trades \u2192 use 2.0.\n - For multiple assets (e.g., selling one to buy another) \u2192 split logically and ensure total \u2264 2.0 (e.g., 1 sell + 1 buy).\n - Interpret \"selling A to B\" as reallocating from A to B, with balanced percentages (e.g., 1 close A + 1 long B).\n - \"sell\" can imply shorting if context suggests; \"buy\" implies going long, \"close\" implies getting out of position and going into cash.\n - If close signal is general (not tied to specific assets) and wording is relevant (e.g., \"getting out of everything\" or \"closing all positions\"), set action: 'trade' and allocations: [] to indicate closing all current positions.\n8. Allocation objects in the allocations array must all be of the same type: either all stocks (NYSE or NASDAQ) or all cryptocurrencies (COINBASE). Do not mix stocks and cryptocurrencies in the same output allocations. Instead it must strictly be one or the other.\n9. Handle reallocations: If text implies shifting from one security to another, use equal splits unless specified otherwise.\n10. **MESSAGE FIELD**: Always populate the `message` field with notes about what was done:\n - For trades (action = 'trade'): Describe what positions have changed and what the current positions are. **CRITICAL**: Always use the \"STOCK:EXCHANGE\" format (e.g., \"TSLA:NASDAQ\", \"BTC:COINBASE\") for all stock/crypto references in the message field, NOT the stock_id from AlphaInsider, as users need human-readable symbols. Express all position sizes as percentages (multiply decimal by 100) with up to 2 decimal places for precision (e.g., 0.5 \u2192 \"50%\", 1.0 \u2192 \"100%\", 0.755 \u2192 \"75.50%\", 1.5 \u2192 \"150%\"). Do not include decimal values in the message - only percentages.\n - For posts (action = 'post'):\n - **User-authored posts**: Simple confirmation of the post that was submitted (e.g., \"Post submitted to audience about...\")\n - **Agent-generated posts**: Confirm what type of analysis or content was posted (e.g., \"Posted technical analysis of your current positions to audience\", \"Posted Bitcoin technical analysis to audience\")\n - For none (action = 'none'): Answer user's trading-related questions or explain why no action was taken. **IMPORTANT**: Only show position information if the user explicitly asks about their positions or allocations. Do not include position details for general questions or unrelated input. When showing position information (if requested), always use \"STOCK:EXCHANGE\" format and percentage format.\n\n### Tools\n\n#### Search Stocks\nHTTP request to AlphaInsider to search for stocks/cryptocurrencies and retrieve comprehensive information about matching securities.\n\n**When to use**: Use this tool proactively whenever you encounter a security mentioned in the input text and you don't know its exact STOCK symbol or EXCHANGE. This tool is REQUIRED before creating allocations for unfamiliar securities.\n\n**Common scenarios**:\n- Unfamiliar company names (e.g., \"Palantir\", \"Coinbase\", \"ARM Holdings\")\n- Ambiguous tickers that could be on multiple exchanges\n- New or lesser-known stocks/cryptocurrencies\n- When you need to verify the correct exchange (NYSE vs NASDAQ)\n- Any security not in the common mappings list in Rule #3\n\n**Parameters**:\n- `search` (required): The name, symbol, or stock of the security to look for (e.g., \"Tesla\", \"TSLA\", \"Bitcoin\", \"BTC\", \"Palantir\")\n- `type` (optional): Either 'cryptocurrency' or 'stock'. Only fill this in if you know the type of security it is.\n\n**Returns**: The tool returns an array of matching stock/cryptocurrency objects based on the input search query. Each object contains:\n- **stock_id**: Unique identifier for the security (use this for the allocations array or by combining the `stock` and `exchange` fields from the returned object as `STOCK:EXCHANGE` format)\n- **symbol**: The ticker symbol (e.g., \"TSLA\")\n- **name**: Full company/asset name (e.g., \"Tesla, Inc. Common Stock\")\n- **exchange**: The exchange where the security trades (e.g., \"NASDAQ\", \"NYSE\", \"COINBASE\")\n- **stock**: The trading symbol\n- **security**: Type of security (\"stock\" or \"cryptocurrency\")\n- **sector**: The industry sector (for stocks, e.g., \"Manufacturing\")\n- **figi_composite**: Financial Instrument Global Identifier\n- **provider**: The data provider AlphaInsider uses (e.g., \"polygon\")\n- **peg**: Currency denomination (e.g., \"USD\")\n- **stock_status**: Current status (e.g., \"active\")\n- **Price data**:\n - **bid**: Current bid price\n - **ask**: Current ask price\n - **last**: Last traded price\n- **slippage**: Slippage value\n- **fee**: Fee value\n- **links**: Object containing URLs to third-party resources:\n - **finviz**: Finviz stock page URL\n - **trading_view**: TradingView chart URL\n - **yahoo_finance**: Yahoo Finance quote URL\n - **google_finance**: Google Finance quote URL\n\n**Important**: For the message field, format the stock_id as \"STOCK:EXCHANGE\" (e.g., \"TSLA:NASDAQ\") by combining the `stock` and `exchange` fields from the returned object as `STOCK:EXCHANGE` format. Price information (bid/ask/last) and other details can be referenced when providing context in the message field if relevant to the user's query.\n\n### Memory\nSimple memory module that stores conversation history from previous trading signals.\n\n**When to use**:\n- Use this tool only when the current Input text is ambiguous and requires context from previous messages to make a decision.\n- Use memory as **supplementary context only** to understand recent patterns, sentiment, or related signals.\n- **DO NOT rely heavily on memory** - the current Input text is always the primary source for decision-making.\n- Memory may help clarify ambiguous references (e.g., \"I'm adding more\" when previous message mentioned a stock).\n- If memory contradicts current input, **prioritize the current input**.\n- Treat memory as helpful background information, not as trading instructions.\n\n**How it works**:\n- The memory module automatically maintains conversation history.\n- Reference it to clarify ambiguous inputs, but always prioritize the current Input text as the primary source for trading decisions.\n\n### Examples:\n\nNote: Allocations do not need to sum exactly to 2.0; they can be less if the signal doesn't warrant full allocation or to accommodate current positions. The agent considers current positions and modifies, keeps, or drops them based on the input text's signals, ensuring the total percent across all final allocations \u2264 2.0. If the text specifies different allocation sizes (e.g., \"half,\" \"quarter\"), adjust percentages accordingly.\n\nExample 1:\nInput text: I'm selling Tesla to Microsoft\nContext: Live tweet from Elon Musk\nWhitelist: TSLA:NASDAQ, MSFT:NASDAQ, BTC:COINBASE\nPositions: [{\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 1.0}]\n\u2192 Output:\n`{\n \"action\": \"trade\",\n \"allocations\": [\n {\"stock_id\": \"MSFT:NASDAQ\", \"action\": \"long\", \"percent\": 1.0}\n ],\n \"message\": \"Sold TSLA position and reallocated 100% to MSFT long. Current positions: MSFT:NASDAQ long 100%.\"\n}`\n(Note: Drops TSLA position due to sell signal, adds MSFT with reallocated percent; total = 1.0 \u2264 2.0; all stocks)\n\nExample 2:\nInput text: Extremely bullish on Nvidia. Adding more NVDA this week\nContext: Telegram trading group\nWhitelist: NVDA:NASDAQ, TSLA:NASDAQ, BTC:COINBASE\nPositions: [{\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 0.5}]\n\u2192 Output:\n`{\n \"action\": \"trade\",\n \"allocations\": [\n {\"stock_id\": \"NVDA:NASDAQ\", \"action\": \"long\", \"percent\": 1.5},\n {\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 0.5}\n ],\n \"message\": \"Added NVDA long position at 150%. Kept existing TSLA position. Current positions: NVDA:NASDAQ long 150%, TSLA:NASDAQ long 50%.\"\n}`\n(Note: Adds NVDA with high allocation, keeps TSLA as no signal against it; total = 2.0; all stocks)\n\nExample 3:\nInput text: Bitcoin is going to crash, I'm out of BTC completely\nContext: Crypto influencer tweet\nWhitelist: BTC:COINBASE, ETH:COINBASE\nPositions: [{\"stock_id\": \"BTC:COINBASE\", \"action\": \"long\", \"percent\": 1.0}, {\"stock_id\": \"ETH:COINBASE\", \"action\": \"long\", \"percent\": 0.5}]\n\u2192 Output:\n`{\n \"action\": \"trade\",\n \"allocations\": [\n {\"stock_id\": \"ETH:COINBASE\", \"action\": \"long\", \"percent\": 0.5}\n ],\n \"message\": \"Closed BTC position completely. Kept ETH position. Current positions: ETH:COINBASE long 50%.\"\n}`\n(Note: Closes BTC, keeps ETH; total = 0.5 < 2.0; all crypto)\nor\n`{\n \"action\": \"trade\",\n \"allocations\": [],\n \"message\": \"Closed all positions. Current positions: None.\"\n}`\n(if interpreted as closing everything, but here specific to BTC)\n\nExample 4:\nInput text: Apple just released new iPhone, looks good\nContext: YouTube video/social media\nWhitelist: TSLA:NASDAQ\nPositions: [{\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 1.0}]\n\u2192 Output:\n`{\n \"action\": \"post\",\n \"allocations\": [],\n \"post\": {\n \"description\": \"Apple just released new iPhone, looks good\"\n },\n \"message\": \"Post submitted to audience about Apple's new iPhone release.\"\n}`\n(Note: User sharing commentary with audience; action = post, no trading signal)\n\nExample 5:\nInput text: Dumping half my TSLA position to go all in on MSFT\nContext: Stock forum post\nWhitelist: TSLA:NASDAQ, MSFT:NASDAQ\nPositions: [{\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 2.0}]\n\u2192 Output:\n`{\n \"action\": \"trade\",\n \"allocations\": [\n {\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 1},\n {\"stock_id\": \"MSFT:NASDAQ\", \"action\": \"long\", \"percent\": 1}\n ],\n \"message\": \"Reduced TSLA position from 200% to 100%. Added MSFT long position at 100%. Current positions: TSLA:NASDAQ long 100%, MSFT:NASDAQ long 100%.\"\n}`\n(Note: Reduces TSLA to half (assuming original was full, but adjusts based on current; \"all in\" on MSFT takes majority; total = 2.0; all stocks)\n\nExample 6:\nInput text: Im getting out of crypto.\nContext: Stock forum post\nWhitelist:\nPositions: [{\"stock_id\": \"BTC:COINBASE\", \"action\": \"long\", \"percent\": 1.0}, {\"stock_id\": \"ETH:COINBASE\", \"action\": \"long\", \"percent\": 0.5}]\n\u2192 Output:\n`{\n \"action\": \"trade\",\n \"allocations\": [],\n \"message\": \"Closed all cryptocurrency positions (BTC and ETH). Current positions: None.\"\n}`\n(Note: Closes all crypto positions since general close for crypto; total = 0 < 2.0; all crypto (empty))\n\nExample 7:\nInput text: Sell 25% of my portfolio in TSLA and buy NVDA with 50%\nContext: Trading signal\nWhitelist: TSLA:NASDAQ, NVDA:NASDAQ\nPositions: [{\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 1.0}, {\"stock_id\": \"MSFT:NASDAQ\", \"action\": \"long\", \"percent\": 0.5}]\n\u2192 Output:\n`{\n \"action\": \"trade\",\n \"allocations\": [\n {\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 0.75},\n {\"stock_id\": \"NVDA:NASDAQ\", \"action\": \"long\", \"percent\": 0.5},\n {\"stock_id\": \"MSFT:NASDAQ\", \"action\": \"long\", \"percent\": 0.5}\n ],\n \"message\": \"Reduced TSLA position from 100% to 75%. Added NVDA long position at 50%. Kept MSFT position. Current positions: TSLA:NASDAQ long 75%, NVDA:NASDAQ long 50%, MSFT:NASDAQ long 50%.\"\n}`\n(Note: Reduces TSLA by 0.25 from current 1.0, adds NVDA at 0.5, keeps MSFT; total = 1.75 < 2.0; all stocks)\n\nExample 8 (Post to Audience):\nInput text: Bitcoin breaking key resistance at $45k! This could signal a major move. Check out the chart: https://tradingview.com/btc-analysis\nContext: Social media post\nWhitelist: BTC:COINBASE\nPositions: [{\"stock_id\": \"BTC:COINBASE\", \"action\": \"long\", \"percent\": 1.0}]\n\u2192 Output:\n`{\n \"action\": \"post\",\n \"allocations\": [],\n \"post\": {\n \"description\": \"Bitcoin breaking key resistance at $45k! This could signal a major move. Check out the chart: https://tradingview.com/btc-analysis\",\n \"url\": \"https://tradingview.com/btc-analysis\"\n },\n \"message\": \"Post submitted to audience about Bitcoin breaking resistance.\"\n}`\n(Note: User is posting analysis to their audience, not making a trade themselves; action = post)\n\nExample 9 (Direct Q&A):\nInput text: What are my current positions?\nContext: Direct question to agent\nWhitelist: TSLA:NASDAQ, MSFT:NASDAQ\nPositions: [{\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 1.0}, {\"stock_id\": \"MSFT:NASDAQ\", \"action\": \"long\", \"percent\": 0.5}]\n\u2192 Output:\n`{\n \"action\": \"none\",\n \"allocations\": [],\n \"message\": \"Your current positions are: TSLA:NASDAQ long 100%, MSFT:NASDAQ long 50%. Total allocation: 150%.\"\n}`\n(Note: User asking direct question; action = none with informative response)\n\nExample 10 (Post without URL):\nInput text: Market looking shaky today. Stay cautious everyone!\nContext: Social media post\nWhitelist:\nPositions: []\n\u2192 Output:\n`{\n \"action\": \"post\",\n \"allocations\": [],\n \"post\": {\n \"description\": \"Market looking shaky today. Stay cautious everyone!\"\n },\n \"message\": \"Post submitted to audience about market caution.\"\n}`\n(Note: User posting general market commentary to audience; action = post, no URL)\n\nExample 11 (Off-topic Question):\nInput text: What's the weather like today?\nContext: Direct question to agent\nWhitelist: TSLA:NASDAQ, MSFT:NASDAQ\nPositions: [{\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 1.0}]\n\u2192 Output:\n`{\n \"action\": \"none\",\n \"allocations\": [],\n \"message\": \"I can only assist with trading signals, stock/cryptocurrency analysis, and position management questions.\"\n}`\n(Note: Off-topic question unrelated to trading; agent declines to answer)\n\nExample 12 (Agent-Generated Post - Current Positions):\nInput text: Make a post about my current positions\nContext: Direct request to agent\nWhitelist: TSLA:NASDAQ, MSFT:NASDAQ, NVDA:NASDAQ\nPositions: [{\"stock_id\": \"TSLA:NASDAQ\", \"action\": \"long\", \"percent\": 1.0}, {\"stock_id\": \"NVDA:NASDAQ\", \"action\": \"long\", \"percent\": 0.5}]\n\u2192 Output:\n`{\n \"action\": \"post\",\n \"allocations\": [],\n \"post\": {\n \"description\": \"Current portfolio allocation: Long TSLA at 100% and NVDA at 50%. Maintaining tech-heavy exposure with focus on EV and AI semiconductor sectors. Total allocation: 150%.\"\n },\n \"message\": \"Posted technical analysis of your current positions to audience.\"\n}`\n(Note: Agent generates professional post content about user's positions; action = post)\n\nExample 13 (Agent-Generated Post - Specific Stock Analysis):\nInput text: Post an update on Bitcoin with technical analysis\nContext: Direct request to agent\nWhitelist: BTC:COINBASE, ETH:COINBASE\nPositions: [{\"stock_id\": \"BTC:COINBASE\", \"action\": \"long\", \"percent\": 2.0}]\n\u2192 Output:\n`{\n \"action\": \"post\",\n \"allocations\": [],\n \"post\": {\n \"description\": \"Bitcoin technical update: Currently holding full position at 200% allocation. BTC showing strength above key support levels. Watching for continuation patterns as momentum indicators remain bullish. Risk managed with defined allocation strategy.\"\n },\n \"message\": \"Posted Bitcoin technical analysis to audience.\"\n}`\n(Note: Agent creates technical analysis post about Bitcoin based on request; action = post)\n\nExample 14 (Agent-Generated Post - Market Commentary):\nInput text: Make a post saying the tech sector looks strong this week\nContext: Direct request to agent\nWhitelist: TSLA:NASDAQ, MSFT:NASDAQ, NVDA:NASDAQ\nPositions: [{\"stock_id\": \"MSFT:NASDAQ\", \"action\": \"long\", \"percent\": 1.0}, {\"stock_id\": \"NVDA:NASDAQ\", \"action\": \"long\", \"percent\": 1.0}]\n\u2192 Output:\n`{\n \"action\": \"post\",\n \"allocations\": [],\n \"post\": {\n \"description\": \"Tech sector showing strong momentum this week. Positioned in MSFT and NVDA with full allocations. Both names demonstrating solid technical structure and relative strength. Watching for continued outperformance in the space.\"\n },\n \"message\": \"Posted tech sector analysis to audience.\"\n}`\n(Note: Agent generates market commentary post based on user's instruction and current positions; action = post)\n\n### Final Output Instructions:\n- Output **ONLY** valid JSON. No explanations, no markdown, no extra text.\n- Use this exact structure:\n `{\n \"action\": \"trade\" or \"post\" or \"none\",\n \"allocations\": [\n {\n \"stock_id\": \"STOCK:EXCHANGE\",\n \"action\": \"long\" or \"short\" or \"close\",\n \"percent\": 0.75\n }\n ],\n \"post\": {\n \"description\": \"exact user message to audience\",\n \"url\": \"optional main URL\"\n },\n \"message\": \"direct message back to user about what was done\"\n }`\n- Set action: 'trade' when there is a clear trading signal (populate allocations; allocations may be empty for general close orders)\n- Set action: 'post' when user is posting to their audience (populate post object with description and optional url)\n- Set action: 'none' when no clear signal, user asking questions, or input is unrelated (provide helpful response in message)\n- The `post` object should only be included when action = 'post'\n- The `message` field is always required and provides context about what action was taken"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 3.1
},
{
"id": "173f0b65-0367-478a-ba09-3b56a0f388d9",
"name": "OpenAI Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
5040,
-1136
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5.4",
"cachedResultName": "gpt-5.4"
},
"options": {},
"builtInTools": {
"webSearch": {
"searchContextSize": "medium"
}
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "e7889255-41f2-4e57-9270-761f6f62f3ee",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
5200,
-1136
],
"parameters": {
"sessionKey": "={{ $('Global Settings').item.json.session_id }}",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "12c275bf-918a-4fe9-9e2d-59998b5c43b1",
"name": "Search Stocks",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
5296,
-1008
],
"parameters": {
"url": "https://alphainsider.com/api/searchStocks",
"method": "POST",
"options": {},
"jsonBody": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('JSON', `Parameters:\n- search: (REQUIRED String) The name or symbol of the stock to look for (e.g., \"Tesla\", \"TSLA\", \"Bitcoin\", \"BTC\")\n- type: (OPTIONAL String) Either 'cryptocurrency' or 'stock'. Only fill this in if you know the type of security it is.\n- limit: (OPTIONAL Number) Limit the number of returned stock values. 10 or less is preferable.`, 'json') }}",
"sendBody": true,
"specifyBody": "json",
"toolDescription": "Makes an HTTP request to searchStocks for finding the information for a stock traded on AlphaInsider. The returned values are a listing of potential stocks the search item could be."
},
"typeVersion": 4.3
},
{
"id": "9ddbeab4-4d40-489c-9dd1-0c7bed58b799",
"name": "Calculator",
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
"position": [
5424,
-1008
],
"parameters": {},
"typeVersion": 1
},
{
"id": "091449dd-0342-4d23-b169-b5efc9782485",
"name": "ParseOutput",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
5488,
-1152
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\"trade\", \"post\", \"none\"],\n \"description\": \"The type of action to take: 'trade' = make a trade with allocations, 'post' = make a post to audience with no trade intention, 'none' = direct conversation with agent (Q&A or unrelated input)\"\n },\n \"allocations\": {\n \"type\": \"array\",\n \"description\": \"Array of stock allocation objects. Only populate when action = 'trade'. Empty array otherwise.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"Trading action: long, short, or close\"\n },\n \"stock_id\": {\n \"type\": \"string\",\n \"description\": \"Stock identifier or ticker symbol writen as \\\"SYMBOL:EXCHANGE\\\" or stock_id from AlphaInsider\"\n },\n \"percent\": {\n \"type\": \"number\",\n \"description\": \"Allocation percentage as a decimal number. 0 <= percent <= 2.\"\n }\n },\n \"required\": [\"action\", \"stock_id\", \"percent\"]\n }\n },\n \"post\": {\n \"type\": \"object\",\n \"description\": \"Only populated when action = 'post'. Contains the user's message to their audience.\",\n \"properties\": {\n \"description\": {\n \"type\": \"string\",\n \"description\": \"The exact message made by the user that is talking to their audience\"\n },\n \"url\": {\n \"type\": \"string\",\n \"description\": \"If the user input text has a main URL in it (if multiple urls, find the most important one), separate this url and submit it to this field. Optional.\"\n }\n },\n \"required\": [\"description\"]\n },\n \"message\": {\n \"type\": \"string\",\n \"description\": \"Direct message back to the user about what was done. For trades: describe what positions have changed and current positions. For posts: simple confirmation of the post submitted. For none: answer questions or explain why no action was taken.\"\n }\n },\n \"required\": [\"action\", \"allocations\", \"message\"]\n}"
},
"typeVersion": 1.3
},
{
"id": "db9675ea-1d41-4670-9308-cf7f017b0460",
"name": "Parse Orders Allocations",
"type": "n8n-nodes-base.code",
"position": [
5744,
-1552
],
"parameters": {
"jsCode": "// Get http response input from AI\nlet allocations = $input.first().json.output.allocations;\n\nallocations = allocations.map(allocation => {\n return {\n ...allocation,\n percent: parseFloat(allocation.percent).toFixed(4)\n };\n});\n\nreturn {allocations};"
},
"typeVersion": 2
},
{
"id": "86e2840a-538a-4f81-9e89-0d374f1ce3ee",
"name": "Create Orders",
"type": "n8n-nodes-base.httpRequest",
"position": [
5968,
-1552
],
"parameters": {
"url": "=https://alphainsider.com/api/newOrderAllocations",
"method": "POST",
"options": {},
"jsonBody": "={{ { \"strategy_id\": $('Global Settings').item.json.strategy_id, \"allocations\": $json.allocations } }}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "562bd695-a98b-45ba-8c5b-df1d79986f3f",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
5568,
-1392
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Trade Action",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "80df08f7-ec9e-49a4-bf83-62c0617a0db3",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output.action }}",
"rightValue": "trade"
}
]
},
"renameOutput": true
},
{
"outputKey": "Post Action",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9d580421-c579-452a-b462-a0740922eb0e",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output.action }}",
"rightValue": "post"
}
]
},
"renameOutput": true
},
{
"outputKey": "No Action",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "56ce5453-15ea-4a5f-9f11-afd31b4ed0c6",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output.action }}",
"rightValue": "none"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.4
},
{
"id": "8c2ef217-3dea-4a1e-8d06-35f2b83b0c11",
"name": "Create Post",
"type": "n8n-nodes-base.httpRequest",
"position": [
5968,
-1376
],
"parameters": {
"url": "https://alphainsider.com/api/newPost",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "description",
"value": "={{ $json.output.post.description }}"
},
{
"name": "url",
"value": "={{ $json.output.post.url }}"
},
{
"name": "strategy_id",
"value": "={{ $('Global Settings').item.json.strategy_id }}"
}
]
},
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.4
},
{
"id": "cd900175-a26d-4f63-a45a-48aff09cc884",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
6224,
-1808
],
"parameters": {
"color": 7,
"width": 592,
"height": 960,
"content": "## Telegram Reply\n\n## How it works\nDetects if the incoming message was a direct message (DM) to the bot. If yes, sends the AI-generated response back to the user via Telegram with trade confirmations, post results, or answers to questions.\n\n## Setup steps\n- No configuration needed - automatic detection\n- Replies only sent for direct messages, not channel posts\n- Uses same Telegram credentials from \"Telegram Channel Listener\" node"
},
"typeVersion": 1
},
{
"id": "956e7836-36a7-4fc9-aac5-62d621d64d5e",
"name": "User Reply",
"type": "n8n-nodes-base.telegram",
"position": [
6560,
-1088
],
"parameters": {
"text": "={{ $('Parse Stock Allocations').item.json.output.message }}",
"chatId": "={{ $('Telegram Channel Listener').item.json.message.chat.id }}",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "a14dfefa-8610-42fe-8565-930a8517448b",
"name": "If DM",
"type": "n8n-nodes-base.if",
"position": [
6288,
-1072
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa1d81be-52e4-4ed7-be49-548db755ace9",
"operator": {
"type": "number",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $('Telegram Channel Listener').item.json.message.chat.id }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.3
},
{
"id": "2bc4f369-7374-42ce-b710-8a09d7f33275",
"name": "Telegram Channel Listener",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
2832,
-1344
],
"parameters": {
"updates": [
"message",
"channel_post"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
}
],
"active": false,
"settings": {
"availableInMCP": false,
"executionOrder": "v1"
},
"connections": {
"If DM": {
"main": [
[
{
"node": "User Reply",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Parse Orders Allocations",
"type": "main",
"index": 0
}
],
[
{
"node": "Create Post",
"type": "main",
"index": 0
}
],
[
{
"node": "If DM",
"type": "main",
"index": 0
}
]
]
},
"Calculator": {
"ai_tool": [
[
{
"node": "Parse Stock Allocations",
"type": "ai_tool",
"index": 0
}
]
]
},
"Create Post": {
"main": [
[
{
"node": "If DM",
"type": "main",
"index": 0
}
]
]
},
"ParseOutput": {
"ai_outputParser": [
[
{
"node": "Parse Stock Allocations",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"OpenAI Model": {
"ai_languageModel": [
[
{
"node": "Parse Stock Allocations",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Channel Check": {
"main": [
[
{
"node": "Message Details",
"type": "main",
"index": 0
}
]
]
},
"Create Orders": {
"main": [
[
{
"node": "If DM",
"type": "main",
"index": 0
}
]
]
},
"Get Positions": {
"main": [
[
{
"node": "Parse Position Percents",
"type": "main",
"index": 0
}
]
]
},
"Message Check": {
"main": [
[
{
"node": "Message Details",
"type": "main",
"index": 0
}
],
[
{
"node": "Channel Check",
"type": "main",
"index": 0
}
]
]
},
"Search Stocks": {
"ai_tool": [
[
{
"node": "Parse Stock Allocations",
"type": "ai_tool",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "Parse Stock Allocations",
"type": "ai_memory",
"index": 0
}
]
]
},
"Global Settings": {
"main": [
[
{
"node": "Get Positions",
"type": "main",
"index": 0
}
]
]
},
"Message Details": {
"main": [
[
{
"node": "Message Details Check",
"type": "main",
"index": 0
}
]
]
},
"Get Voice Message": {
"main": [
[
{
"node": "Transcribe Voice Message",
"type": "main",
"index": 0
}
]
]
},
"Message Details Check": {
"main": [
[
{
"node": "Global Settings",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Voice Message",
"type": "main",
"index": 0
}
]
]
},
"Parse Position Percents": {
"main": [
[
{
"node": "Parse Stock Allocations",
"type": "main",
"index": 0
}
]
]
},
"Parse Stock Allocations": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Parse Orders Allocations": {
"main": [
[
{
"node": "Create Orders",
"type": "main",
"index": 0
}
]
]
},
"Transcribe Voice Message": {
"main": [
[
{
"node": "Global Settings",
"type": "main",
"index": 0
}
]
]
},
"Telegram Channel Listener": {
"main": [
[
{
"node": "Message Check",
"type": "main",
"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.
httpBearerAuthopenAiApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Automate trading on AlphaInsider by monitoring Telegram messages. Uses AI to analyze signals and execute trades, create posts, or answer questions.
Source: https://n8n.io/workflows/13816/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.
RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.
Digital marketers, content creators, social media managers, and businesses who want to use AI marketing automation for YouTube Shorts without spending hours on production. This AI workflow helps anyon
Who is this for? Agencies, consultants, and service providers who conduct discovery calls and need to quickly turn conversations into professional proposals.
Transform your salon/service business with this streamlined Telegram automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I