AutomationFlowsSlack & Telegram › Dobby Hibachi

Dobby Hibachi

Dobby Hibachi. Uses httpRequest, telegramTrigger, telegram. Event-driven trigger; 29 nodes.

Event trigger★★★★☆ complexity29 nodesHTTP RequestTelegram TriggerTelegram
Slack & Telegram Trigger: Event Nodes: 29 Complexity: ★★★★☆ Added:

This workflow follows the HTTP Request → Telegram 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
{
  "name": "Dobby Hibachi",
  "nodes": [
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "940ed6ec-f5cc-47d3-9894-8eef9e47b6e0",
              "leftValue": "={{ $json.data[0].code }}",
              "rightValue": 404,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        432,
        -512
      ],
      "id": "ecb8b0d7-33b9-44c0-b39f-71dcd859d994",
      "name": "404"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "940ed6ec-f5cc-47d3-9894-8eef9e47b6e0",
              "leftValue": "={{ $json.data[0].code }}",
              "rightValue": 429,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        656,
        -416
      ],
      "id": "0e482bda-5305-441e-928a-22bb9babc88e",
      "name": "429"
    },
    {
      "parameters": {
        "url": "https://api.twelvedata.com/time_series?",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "=apikey",
              "value": "={{ $json.apikey1m }}"
            },
            {
              "name": "symbol",
              "value": "={{ $json.symbol }}"
            },
            {
              "name": "interval",
              "value": "1min"
            },
            {
              "name": "outputsize",
              "value": "100"
            },
            {
              "name": "exchange",
              "value": "BINANCE"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -240,
        -704
      ],
      "id": "6439d065-8d86-4a90-9643-40bd0266758f",
      "name": "1min"
    },
    {
      "parameters": {
        "numberInputs": 3
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -16,
        -528
      ],
      "id": "9a3d629e-7854-4db8-bb47-0a67b1333275",
      "name": "Merge"
    },
    {
      "parameters": {
        "url": "https://api.twelvedata.com/time_series?",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "=apikey",
              "value": "={{ $json.apikey15m }}"
            },
            {
              "name": "symbol",
              "value": "={{ $json.symbol }}"
            },
            {
              "name": "interval",
              "value": "15min"
            },
            {
              "name": "outputsize",
              "value": "100"
            },
            {
              "name": "exchange",
              "value": "BINANCE"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -240,
        -512
      ],
      "id": "56dc5c07-05d2-40cc-b421-d6395370559c",
      "name": "15min"
    },
    {
      "parameters": {
        "url": "https://api.twelvedata.com/time_series?",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "=apikey",
              "value": "={{ $json.apikey1h }}"
            },
            {
              "name": "symbol",
              "value": "={{ $json.symbol }}"
            },
            {
              "name": "interval",
              "value": "1h"
            },
            {
              "name": "outputsize",
              "value": "100"
            },
            {
              "name": "exchange",
              "value": "BINANCE"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -240,
        -320
      ],
      "id": "1a4e5bfa-445c-4b97-9914-d79c19d0768a",
      "name": "1h"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        208,
        -512
      ],
      "id": "572788a6-390d-4def-a58f-638345173c13",
      "name": "Aggregate"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.fireworks.ai/inference/v1/chat/completions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer fw_3ZN44gAXzejooyEFaJd6wPz2"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n    \"model\": \"accounts/sentientfoundation/models/dobby-unhinged-llama-3-3-70b-new\",\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": \"{{ $json.prompt }}\"\n      }\n    ],\n    \"max_tokens\": 512,\n    \"temperature\": 0.6,\n    \"top_p\": 1,\n    \"top_k\": 40,\n    \"presence_penalty\": 0,\n    \"frequency_penalty\": 0\n  }",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -240,
        -32
      ],
      "id": "e70b33ed-ee9d-4b2a-93bb-20b57da7449b",
      "name": "Dobby"
    },
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1.2,
      "position": [
        -688,
        -512
      ],
      "id": "d5097263-32f3-4cb3-b6d0-0f70fd1372b4",
      "name": "Ticker",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "9d47149c-4ea8-4430-81e2-3ca58dd743a3",
              "name": "=prompt",
              "value": "=\nProvide your answer as plain text with bullet points and clear line breaks.\n\n{{ $json.ticker }}\nTechnical Data (candles):\n{{ JSON.stringify($json.candles1m) }}\n{{ JSON.stringify($json.candles15m) }}\n{{ JSON.stringify($json.candles1h) }}\n\n\nEach candle object has:\n- timeframe: \"1m\", \"15m\" or \"1h\"\n- candles: [openTime, open, high, low, close, volume, ...]\n\nSteps for the agent:\n1. Group candles by timeframe (1m, 15m, 1h).\n2. Use 1m & 15m action + indicators (RSI, MACD, trendlines) for optimal entry.\n3. Confirm trend with 1h data.\n4. Factor in sentiment to refine the Buy/Sell/Hold call.\n\n### Response format (no extra text!):\n###  {{ $json.ticker }}\n\u2022 Technical Recommendation:\n< BUY | SELL | HOLD>\n\u2022 Entry Price: <number>\n\u2022 Stop-Loss: \u2039number>\n\u2022 Target/Exit Price:\n\n=====================",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1136,
        -320
      ],
      "id": "4926b839-4093-45d5-9786-39d5218c6eee",
      "name": "Prompt"
    },
    {
      "parameters": {
        "jsCode": "const prompt = $input.first().json.prompt;\n\n// JSON array'i g\u00fcvenli \u015fekilde bulmak i\u00e7in daha esnek bir regex\nconst match = prompt.match(/\\[\\s*\\{[\\s\\S]*?\\}\\s*\\]/);\n\nif (!match) {\n  throw new Error(\"Prompt i\u00e7inde JSON format\u0131nda bir dizi bulunamad\u0131.\");\n}\n\ntry {\n  const jsonArrayStr = match[0];\n  const parsedArray = JSON.parse(jsonArrayStr);\n\n  return [{ json: { candles: parsedArray } }];\n} catch (err) {\n  throw new Error(\"JSON parse hatas\u0131: \" + err.message);\n}"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -688,
        -32
      ],
      "id": "044e20e9-3300-4ea4-ab10-0a17b90966a1",
      "name": "Prompt Check"
    },
    {
      "parameters": {
        "jsCode": "const candles1m = $json.candles;\n\n// 15m ve 1h mumlar\u0131, son 15 ve 60 adet 1 dakikal\u0131k mum \u00fczerinden hesaplan\u0131r\nconst groupCandles = (source, interval) => {\n  const grouped = [];\n  for (let i = 0; i < source.length; i += interval) {\n    const slice = source.slice(i, i + interval);\n    if (slice.length === 0) continue;\n    grouped.push({\n      time: slice[0].time,\n      open: slice[0].open,\n      high: Math.max(...slice.map(c => c.high)),\n      low: Math.min(...slice.map(c => c.low)),\n      close: slice[slice.length - 1].close,\n    });\n  }\n  return grouped;\n};\n\nconst candles15m = groupCandles(candles1m, 15);\nconst candles1h = groupCandles(candles1m, 60);\n\n// Formatlama\nconst formatCandles = (candles) =>\n  candles.map(c => \n    `Time: ${c.time}, Open: ${c.open}, High: ${c.high}, Low: ${c.low}, Close: ${c.close}`\n  ).join('\\n');\n\n// \u00d6zetler\nconst summary1m = formatCandles(candles1m.slice(-5)); // son 5 mum\nconst summary15m = formatCandles(candles15m.slice(-3)); // son 3 grup\nconst summary1h = formatCandles(candles1h.slice(-2)); // son 2 grup\n\n// Prompt\nconst finalPrompt = `You are a professional crypto day trader. Analyze the price action across multiple timeframes: 1-minute, 15-minute, and 1-hour candles for BTC. Identify trend direction, momentum, and possible entries or reversals. Your response must be based only on the candle data provided. Do NOT use sentiment or external data. Be clear and concise.\\n\\nUse this format ONLY:\\nTechnical Recommendation: <BUY | SELL | HOLD>\\nEntry Price: <number>\\nStop-Loss: <number>\\nTarget/Exit Price: <number>\\n\\n---\\n1-Minute Candles:\\n${summary1m}\\n\\n15-Minute Candles:\\n${summary15m}\\n\\n1-Hour Candles:\\n${summary1h}`;\n\nconst safePrompt = finalPrompt.replace(/\\n/g, \"\\\\n\");\n\nreturn [{\n  json: {\n    prompt: safePrompt\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -464,
        -32
      ],
      "id": "ddb20936-9089-4e8f-8d66-70f297677e63",
      "name": "Prompt Safe"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "d738af6d-8610-4f3f-b8af-a6eed2a7dd9f",
              "name": "apikey1m",
              "value": "c725c96196424a09a1273123a7dbbca9",
              "type": "string"
            },
            {
              "id": "a4a7bc9a-d348-4bc0-a8dd-b0ccd3f2e940",
              "name": "=symbol",
              "value": "={{$json.message.text.toUpperCase() }}/USD",
              "type": "string"
            },
            {
              "id": "6742a693-b828-4392-b830-9d795f01dc60",
              "name": "apikey15m",
              "value": "5a1c5d582335446ab97b8c59fe31e52f",
              "type": "string"
            },
            {
              "id": "a88a0395-09f0-488d-ae80-de46ece96243",
              "name": "apikey1h",
              "value": "7565020ce0504c1ca32de3e83e76f8b1",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -464,
        -512
      ],
      "id": "67b018b6-0ce2-4392-8d34-8426c65a46c8",
      "name": "User Ticker"
    },
    {
      "parameters": {
        "chatId": "{{ $node[\"Ticker\"].json[\"message\"][\"from\"][\"id\"] }}",
        "text": "=INVALID TICKER",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        656,
        -608
      ],
      "id": "b84499f7-04f5-4d77-ae63-e9dbbf633eab",
      "name": "TG 404 Error",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "chatId": "{{ $node[\"Ticker\"].json[\"message\"][\"from\"][\"id\"] }}",
        "text": "=API throttled. 8 requests per minute allowed.",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        880,
        -512
      ],
      "id": "06727fed-9b53-4cf6-9c76-1ee00dc14aab",
      "name": "TG 429 Error",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const raw = items[0].json.data;\n\n// \ud83d\udd27 Candle verilerini normalize eden yard\u0131mc\u0131 fonksiyon\nfunction normalize(values) {\n  return values\n    .map(v => ({\n      time: new Date(v.datetime),\n      open: parseFloat(v.open),\n      high: parseFloat(v.high),\n      low: parseFloat(v.low),\n      close: parseFloat(v.close),\n      volume: parseFloat(v.volume ?? 0)\n    }))\n    .sort((a, b) => a.time - b.time);\n}\n\nconst result = {\n  ticker: \"NEAR/USD\",\n  candles1m: [],\n  candles15m: [],\n  candles1h: []\n};\n\n// \ud83d\udd04 T\u00fcm entry'leri d\u00f6n \u2192 her biri farkl\u0131 interval\nfor (const entry of raw) {\n  const interval = entry.meta?.interval;\n  const values = entry.values ?? [];\n\n  if (interval === \"1min\") {\n    result.candles1m = normalize(values);\n  } else if (interval === \"15min\") {\n    result.candles15m = normalize(values);\n  } else if (interval === \"1h\") {\n    result.candles1h = normalize(values);\n  }\n}\n\nreturn [{ json: result }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        880,
        -320
      ],
      "id": "4fe130e8-4a93-46e5-845a-1bee43dd7265",
      "name": "Arrange Data"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.telegram.org/bot7344694619:AAHw8IQB6RHs7dUE1jQyVcebEB-xPMvhCkE/sendMessage",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "chat_id",
              "value": "={{ $node[\"Ticker\"].json[\"message\"][\"from\"][\"id\"] }}"
            },
            {
              "name": "text",
              "value": "={{ $('User Ticker').item.json.symbol.split('/').first().toUpperCase() }} Prediction\n\n{{ $node[\"Dobby\"].json[\"choices\"][\"0\"][\"message\"][\"content\"] }}\n\n\nCreated Order:{{ $json.orderId }}\n\nOrder Body: {\n  \"accountId\": XXXXX,\n  \"symbol\": \"{{ $('Open Arrange Data').item.json.orderDraft.symbol }}\",\n  \"nonce\": {{ $('Open Arrange Data').item.json.orderDraft.nonce }},\n  \"side\": \"{{ $('Open Arrange Data').item.json.orderDraft.side }}\",\n  \"orderType\": \"{{ $('Open Arrange Data').item.json.orderDraft.orderType }}\",\n  \"quantity\": \"{{ $('Open Arrange Data').item.json.orderDraft.quantity }}\",\n  \"price\": \"{{ $('Open Arrange Data').item.json.orderDraft.price }}\",\n  \"maxFeesPercent\": \"{{ $('Open Arrange Data').item.json.orderDraft.maxFeesPercent }}\",\n  \"creationDeadline\": {{ $('Open Arrange Data').item.json.orderDraft.creationDeadline }},\n  \"signature\": \"XXXXX\"\n}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        416,
        256
      ],
      "id": "b88a3837-05a0-4d7d-a866-74ef8257c06b",
      "name": "Send msg"
    },
    {
      "parameters": {
        "url": "=https://data-api.hibachi.xyz/market/data/prices?",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "symbol",
              "value": "={{ $json.ticker }}/USDT-P"
            }
          ]
        },
        "options": {}
      },
      "id": "a922868c-9d88-4a50-b18c-eff06270547f",
      "name": "MarketInfo",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -704,
        256
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "ticker",
              "value": "={{ $('User Ticker').item.json.symbol.split('/').first() }}"
            }
          ]
        },
        "options": {}
      },
      "id": "2e9a5884-3805-4291-8106-ffc667441fea",
      "name": "Ticker Param",
      "type": "n8n-nodes-base.set",
      "typeVersion": 2,
      "position": [
        1328,
        -16
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.hibachi.xyz/trade/order",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"accountId\": {{ $('Open Arrange Data').item.json.orderDraft.accountId }},\n  \"symbol\": \"{{ $('Open Arrange Data').item.json.orderDraft.symbol }}\",\n  \"nonce\": {{ $('Open Arrange Data').item.json.orderDraft.nonce }},\n  \"side\": \"{{ $('Open Arrange Data').item.json.orderDraft.side }}\",\n  \"orderType\": \"{{ $('Open Arrange Data').item.json.orderDraft.orderType }}\",\n  \"quantity\": \"{{ $('Open Arrange Data').item.json.orderDraft.quantity }}\",\n  \"price\": \"{{ $('Open Arrange Data').item.json.orderDraft.price }}\",\n  \"maxFeesPercent\": \"{{ $('Open Arrange Data').item.json.orderDraft.maxFeesPercent }}\",\n  \"creationDeadline\": {{ $('Open Arrange Data').item.json.orderDraft.creationDeadline }},\n  \"signature\": \"{{ $('Order Signature').item.json.signatureHex }}\"\n}",
        "options": {}
      },
      "id": "b49cbefa-82fa-4ec5-aaac-42048271f6a2",
      "name": "Order",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        192,
        256
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "https://data-api.hibachi.xyz/market/exchange-info",
        "options": {}
      },
      "id": "1609782f-6c5c-4d2e-974e-83559b4db7fd",
      "name": "ExchangeInfo",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -480,
        256
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://hibachi-signer.vercel.app/api/sign-order",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"nonce\": {{ $('Open Arrange Data').item.json.signingFields.nonce }},\n  \"contractId\": {{ $('Open Arrange Data').item.json.signingFields.contractId }},\n  \"quantityScaled64\": {{ $('Open Arrange Data').item.json.signingFields.quantityScaled64 }},\n  \"side\": {{ $('Open Arrange Data').item.json.signingFields.side }},\n  \"maxFeesBps64\": {{ $('Open Arrange Data').item.json.signingFields.maxFeesBps64 }},\n  \"orderType\": \"{{ $('Open Arrange Data').item.json.signingFields.orderType }}\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -32,
        256
      ],
      "id": "d1c25429-d88e-4ff7-a15a-93cf77f48a6d",
      "name": "Order Signature"
    },
    {
      "parameters": {
        "url": "https://data-api.hibachi.xyz/market/exchange-info",
        "options": {}
      },
      "id": "7a2c558f-c081-47d6-8532-d9d7e8bde053",
      "name": "CloseExchangeInfo",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        432,
        -96
      ]
    },
    {
      "parameters": {
        "jsCode": "// ========== Close Position Arrange Data - POSITION BASED ==========\n\n// --- CONFIG ---\nconst ACCOUNT_ID = 13898;\nconst TARGET_SYMBOL = \"ETH/USDT-P\"; // Kapat\u0131lacak pozisyon sembol\u00fc\n\n// --- INPUTS ---\nconst accountInfo = $('Hibachi Account Info').first()?.json || {};\nconst exchangeInfo = $('CloseExchangeInfo').first().json || {};\n\nconsole.log(\"\ud83c\udfe6 Account Info:\", JSON.stringify(accountInfo, null, 2));\n\n// --- FIND OPEN POSITION ---\nconst positions = accountInfo.positions || [];\nconsole.log(\"\ud83d\udcca All positions:\", positions);\n\nif (positions.length === 0) {\n    throw new Error(\"No open positions found\");\n}\n\n// Target pozisyonu bul\nconst targetPosition = positions.find(pos => pos.symbol === TARGET_SYMBOL);\n\nif (!targetPosition) {\n    throw new Error(`No open position found for ${TARGET_SYMBOL}. Available: ${positions.map(p => p.symbol).join(', ')}`);\n}\n\nconsole.log(\"\ud83c\udfaf Target position:\", JSON.stringify(targetPosition, null, 2));\n\n// --- POSITION ANALYSIS ---\nconst positionQuantity = parseFloat(targetPosition.quantity);\nconst positionDirection = targetPosition.direction; // \"Long\" or \"Short\"\nconst markPrice = parseFloat(targetPosition.markPrice);\n\nif (Math.abs(positionQuantity) === 0) {\n    throw new Error(`Position quantity is zero for ${TARGET_SYMBOL}`);\n}\n\n// Kapatma order side belirleme\nconst closeOrderSide = positionDirection === \"Long\" ? \"ASK\" : \"BID\";\nconst closeOrderQuantity = Math.abs(positionQuantity); // Pozitif quantity kullan\n\nconsole.log(\"\ud83d\udd04 Position close analysis:\", {\n    symbol: TARGET_SYMBOL,\n    direction: positionDirection,\n    quantity: positionQuantity,\n    absQuantity: closeOrderQuantity,\n    closeOrderSide: closeOrderSide,\n    markPrice: markPrice\n});\n\n// --- CONTRACT INFO ---\nconst contracts = exchangeInfo.futureContracts || [];\nconst contract = contracts.find(c => c.symbol === TARGET_SYMBOL);\n\nif (!contract) {\n    throw new Error(`Contract not found for ${TARGET_SYMBOL}. Available: ${contracts.map(c => c.symbol).join(', ')}`);\n}\n\nconst {\n  id: contractId,\n  symbol,\n  underlyingDecimals,\n  settlementDecimals,\n  stepSize,\n  minOrderSize,\n  tickSize,\n  minNotional\n} = contract;\n\nconsole.log(\"\ud83d\udcca Contract info:\", {\n    contractId,\n    symbol,\n    underlyingDecimals,\n    settlementDecimals,\n    stepSize,\n    minOrderSize\n});\n\n// --- QUANTITY ADJUSTMENT ---\nlet finalCloseQuantity = closeOrderQuantity;\n\n// stepSize alignment\nconst stepSizeNum = parseFloat(stepSize);\nif (stepSizeNum > 0) {\n    finalCloseQuantity = Math.floor(closeOrderQuantity / stepSizeNum) * stepSizeNum;\n    console.log(\"\ud83d\udcd0 Step size adjustment:\", {\n        original: closeOrderQuantity,\n        stepSize: stepSizeNum,\n        adjusted: finalCloseQuantity\n    });\n}\n\n// minOrderSize check\nconst minOrderSizeNum = parseFloat(minOrderSize);\nif (finalCloseQuantity < minOrderSizeNum) {\n    console.log(`\u26a0\ufe0f Quantity ${finalCloseQuantity} below minOrderSize ${minOrderSizeNum}, using minOrderSize`);\n    finalCloseQuantity = minOrderSizeNum;\n}\n\n// Ensure we don't close more than position size\nif (finalCloseQuantity > closeOrderQuantity) {\n    finalCloseQuantity = closeOrderQuantity;\n    console.log(`\u26a0\ufe0f Adjusted quantity back to position size: ${finalCloseQuantity}`);\n}\n\n// --- FEE CALCULATION ---\nconst feeConfig = exchangeInfo.feeConfig || {};\nconst tradeTakerFeeRate = parseFloat(feeConfig.tradeTakerFeeRate || accountInfo.tradeTakerFeeRate || \"0.00020\");\nconst maxFeesPercent = Math.max(tradeTakerFeeRate * 100 * 2, 0.10); // Fee'nin 2 kat\u0131, en az 0.10%\n\nconsole.log(\"\ud83d\udcb3 Fee calculation:\", {\n    tradeTakerFeeRate: tradeTakerFeeRate,\n    maxFeesPercent: maxFeesPercent\n});\n\n// --- SCALING ---\nconst underlyingDecimalsNum = Number(underlyingDecimals);\nconst qtyScaled64 = Math.round(finalCloseQuantity * Math.pow(10, underlyingDecimalsNum));\nconst maxFeesBps64 = Math.round(maxFeesPercent * Math.pow(10, 8)); // 10^8 for rate fees\n\nconsole.log(\"\ud83d\udd22 Scaling:\", {\n    finalQuantity: finalCloseQuantity,\n    underlyingDecimals: underlyingDecimalsNum,\n    qtyScaled64: qtyScaled64,\n    maxFeesPercent: maxFeesPercent,\n    maxFeesBps64: maxFeesBps64\n});\n\n// --- NONCE ---\nconst now = Date.now() * 1000; // microseconds\n\n// --- CLOSE ORDER DRAFT ---\nconst closeOrderDraft = {\n  accountId: String(ACCOUNT_ID),\n  symbol: TARGET_SYMBOL,\n  nonce: now,\n  side: closeOrderSide,              // ASK (sell Long) or BID (buy Short)\n  orderType: \"MARKET\",               // Market order for immediate execution\n  quantity: finalCloseQuantity.toFixed(underlyingDecimalsNum),\n  price: \"0\",                        // Market order - no price\n  maxFeesPercent: maxFeesPercent.toFixed(6),\n  creationDeadline: Math.floor(Date.now() / 1000) + 60\n};\n\n// --- SIGNING FIELDS ---\nconst signingFields = {\n  nonce: now,\n  contractId: contractId,\n  quantityScaled64: qtyScaled64,\n  side: closeOrderSide === \"ASK\" ? 0 : 1, // ASK=0, BID=1\n  maxFeesBps64: maxFeesBps64,\n  orderType: \"MARKET\"\n};\n\nconsole.log(\"\ud83d\udd10 Close order signing fields:\", JSON.stringify(signingFields, null, 2));\nconsole.log(\"\ud83d\udcdd Close order draft:\", JSON.stringify(closeOrderDraft, null, 2));\n\n// --- VALIDATION ---\nif (qtyScaled64 <= 0) {\n    throw new Error(`CRITICAL: Close quantityScaled64 is ${qtyScaled64}`);\n}\n\nif (maxFeesBps64 <= 0) {\n    throw new Error(`CRITICAL: maxFeesBps64 is ${maxFeesBps64}`);\n}\n\n// --- OUTPUT ---\nreturn [{\n  json: {\n    // Position info\n    originalPosition: {\n        symbol: TARGET_SYMBOL,\n        direction: positionDirection,\n        quantity: positionQuantity,\n        absQuantity: closeOrderQuantity,\n        markPrice: markPrice,\n        notionalValue: targetPosition.notionalValue || 'N/A',\n        unrealizedPnl: targetPosition.unrealizedTradingPnl || 'N/A'\n    },\n\n    // Contract info\n    contractId,\n    symbol: TARGET_SYMBOL,\n    underlyingDecimals,\n    settlementDecimals,\n    stepSize,\n    minOrderSize,\n\n    // Close order draft\n    closeOrderDraft,\n\n    // Signing fields\n    signingFields,\n\n    // Action summary\n    actionSummary: {\n        action: \"CLOSE_POSITION\",\n        positionDirection: positionDirection,\n        closeOrderSide: closeOrderSide,\n        positionQuantity: positionQuantity,\n        closeQuantity: finalCloseQuantity,\n        explanation: `Closing ${positionDirection} position of ${Math.abs(positionQuantity)} ${TARGET_SYMBOL} with ${closeOrderSide} order of ${finalCloseQuantity}`,\n        estimatedValue: finalCloseQuantity * markPrice\n    },\n\n    // Fee info\n    feeInfo: {\n        tradeTakerFeeRate,\n        maxFeesPercent,\n        maxFeesBps64\n    },\n\n    // Debug info\n    debug: {\n        allPositions: positions,\n        targetPosition: targetPosition,\n        quantityCalculation: {\n            original: closeOrderQuantity,\n            stepSizeAdjusted: Math.floor(closeOrderQuantity / stepSizeNum) * stepSizeNum,\n            final: finalCloseQuantity,\n            scaled: qtyScaled64\n        }\n    }\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        656,
        -96
      ],
      "id": "76e8dfc9-4756-4bf1-8ed8-58371e8f4098",
      "name": "CloseArrange Data"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://hibachi-signer.vercel.app/api/sign-order",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"nonce\": {{ $('CloseArrange Data').item.json.signingFields.nonce }},\n  \"contractId\": {{ $('CloseArrange Data').item.json.signingFields.contractId }},\n  \"quantityScaled64\": {{ $('CloseArrange Data').item.json.signingFields.quantityScaled64 }},\n  \"side\": {{ $('CloseArrange Data').item.json.signingFields.side }},\n  \"maxFeesBps64\": {{ $('CloseArrange Data').item.json.signingFields.maxFeesBps64 }},\n  \"orderType\": \"{{ $('CloseArrange Data').item.json.signingFields.orderType }}\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        880,
        -96
      ],
      "id": "7265e842-9d5f-4f18-b968-70988aee5a54",
      "name": "Close Order Signature"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.hibachi.xyz/trade/order",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"accountId\": {{ $('CloseArrange Data').item.json.closeOrderDraft.accountId }},\n  \"symbol\": \"{{ $('CloseArrange Data').item.json.closeOrderDraft.symbol }}\",\n  \"nonce\": {{ $('CloseArrange Data').item.json.closeOrderDraft.nonce }},\n  \"side\": \"{{ $('CloseArrange Data').item.json.closeOrderDraft.side }}\",\n  \"orderType\": \"{{ $('CloseArrange Data').item.json.closeOrderDraft.orderType }}\",\n  \"quantity\": \"{{ $('CloseArrange Data').item.json.closeOrderDraft.quantity }}\",\n  \"price\": \"{{ $('CloseArrange Data').item.json.closeOrderDraft.price }}\",\n  \"maxFeesPercent\": \"{{ $('CloseArrange Data').item.json.closeOrderDraft.maxFeesPercent }}\",\n  \"creationDeadline\": {{ $('CloseArrange Data').item.json.closeOrderDraft.creationDeadline }},\n  \"signature\": \"{{ $('Close Order Signature').item.json.signatureHex }}\"\n}",
        "options": {}
      },
      "id": "1b5c0c3e-18d8-48e1-8e8b-4ad1e52be8dc",
      "name": "Close Order",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1104,
        -96
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "d3b076bd-eecd-437f-ba26-ebf32f529320",
              "leftValue": "={{ $json.positions }}",
              "rightValue": "",
              "operator": {
                "type": "array",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        208,
        -32
      ],
      "id": "b827eb2e-17d3-432b-8276-7f5a59911fb9",
      "name": "If"
    },
    {
      "parameters": {
        "jsCode": "// ========== Arrange Data - DYNAMIC SIDE LOGIC ==========\n\n// --- INPUT DATA ANALYSIS ---\nconst inputData = $input.all()[0] || {};\nconst inputJson = inputData.json || {};\n\nconsole.log(\"\ud83d\udd0d Input data:\", JSON.stringify(inputJson, null, 2));\n\n// --- DYNAMIC SIDE DETECTION ---\nlet detectedAction = \"BUY\"; // Default\nlet SIDE = \"BID\"; // Default\n\n// Content'ten action detect et\nconst contentSources = [\n    inputJson.content,\n    inputJson.message,\n    inputJson.text,\n    inputJson.action,\n    inputJson.signal,\n    inputJson.recommendation\n];\n\nfor (const content of contentSources) {\n    if (typeof content === 'string') {\n        const lowerContent = content.toLowerCase();\n        console.log(\"\ud83d\udcdd Checking content:\", lowerContent);\n        \n        if (lowerContent.includes('sell') || \n            lowerContent.includes('short') || \n            lowerContent.includes('close long')) {\n            detectedAction = \"SELL\";\n            SIDE = \"ASK\";\n            break;\n        } else if (lowerContent.includes('buy') || \n                   lowerContent.includes('long') || \n                   lowerContent.includes('close short')) {\n            detectedAction = \"BUY\";\n            SIDE = \"BID\";\n            break;\n        }\n    }\n}\n\n// Explicit action field varsa o \u00f6ncelikli\nif (inputJson.action) {\n    const actionLower = String(inputJson.action).toLowerCase();\n    if (actionLower.includes('sell') || actionLower === 'ask') {\n        detectedAction = \"SELL\";\n        SIDE = \"ASK\";\n    } else if (actionLower.includes('buy') || actionLower === 'bid') {\n        detectedAction = \"BUY\";\n        SIDE = \"BID\";\n    }\n}\n\nconsole.log(\"\ud83c\udfaf Action Detection:\", {\n    detectedAction: detectedAction,\n    SIDE: SIDE,\n    meaning: SIDE === \"BID\" ? \"Buy/Long\" : \"Sell/Short\"\n});\n\n// --- CONFIG ---\nconst TARGET = { displayName: \"ETH/USDT Perps\", symbol: null };\nconst ORDER_TYPE = \"MARKET\"; // MARKET order\nconst SPEND_RATIO = 0.9;     // Bakiyenin %90'\u0131\nconst ACCOUNT_ID = 13898;    \n\n// --- INPUTS ---\nconst exchangeInfo = $('ExchangeInfo').first().json || {};\nconst contracts = exchangeInfo.futureContracts || [];\nconst feeConfig = exchangeInfo.feeConfig || {};\n\nconsole.log(\"\ud83d\udcb0 Fee Config:\", JSON.stringify(feeConfig, null, 2));\n\n// --- FEE CALCULATION ---\nconst tradeTakerFeeRate = parseFloat(feeConfig.tradeTakerFeeRate || \"0.00045\");\nconst tradeMakerFeeRate = parseFloat(feeConfig.tradeMakerFeeRate || \"0.00015\");\nconst feeRate = ORDER_TYPE === \"MARKET\" ? tradeTakerFeeRate : tradeMakerFeeRate;\n\nconst feePercent = feeRate * 100;\nconst maxFeesPercent = Math.max(feePercent * 2, 0.10);\n\nconsole.log(\"\ud83d\udcb3 Fee calculation:\", {\n    feeRate: feeRate,\n    feePercent: feePercent,\n    maxFeesPercent: maxFeesPercent\n});\n\n// --- MARKET & ACCOUNT INFO ---\nconst marketInfo = $('MarketInfo').first().json || {};\nconst markPrice = parseFloat(marketInfo.markPrice);\nconst accountInfo = $('Hibachi Account Info').first()?.json || {};\n\nif (!isFinite(markPrice) || markPrice <= 0) {\n    throw new Error(\"MarketInfo.markPrice invalid: \" + markPrice);\n}\n\n// --- BALANCE ---\nlet balance = 0;\nif (accountInfo.balance && parseFloat(accountInfo.balance) > 0) {\n    balance = parseFloat(accountInfo.balance);\n} else if (accountInfo.assets && Array.isArray(accountInfo.assets)) {\n    const usdtAsset = accountInfo.assets.find(a => \n        String(a.symbol || '').toUpperCase() === 'USDT'\n    );\n    if (usdtAsset) {\n        balance = parseFloat(usdtAsset.available || usdtAsset.free || usdtAsset.quantity || 0);\n    }\n}\n\nif (balance <= 0) {\n    balance = 50; // Test i\u00e7in fallback\n}\n\nconsole.log(\"\ud83d\udcb5 Balance:\", balance);\n\n// --- CONTRACT ---\nlet contract = contracts.find(c => c.displayName === TARGET.displayName);\nif (!contract) {\n    throw new Error(\"Contract not found. Available: \" + \n        contracts.map(c => c.displayName).join(', '));\n}\n\nconst {\n  id: contractId,\n  displayName,\n  symbol,\n  tickSize,\n  stepSize,\n  underlyingDecimals,\n  settlementDecimals,\n  minNotional,\n  minOrderSize,\n} = contract;\n\n// --- QUANTITY CALCULATION ---\nconst spendAmount = balance * SPEND_RATIO;\nlet qty = spendAmount / markPrice;\n\n// stepSize adjustment\nconst stepSizeNum = parseFloat(stepSize);\nif (stepSizeNum > 0) {\n    qty = Math.floor(qty / stepSizeNum) * stepSizeNum;\n}\n\n// minOrderSize check\nconst minOrderSizeNum = parseFloat(minOrderSize);\nif (qty < minOrderSizeNum) {\n    qty = minOrderSizeNum;\n}\n\n// minNotional check\nconst minNotionalNum = parseFloat(minNotional);\nconst notionalValue = qty * markPrice;\nif (notionalValue < minNotionalNum) {\n    const neededQty = minNotionalNum / markPrice;\n    qty = Math.ceil(neededQty / stepSizeNum) * stepSizeNum;\n}\n\nconsole.log(\"\ud83d\udccf Final quantity:\", qty);\n\n// --- SCALING ---\nconst underlyingDecimalsNum = Number(underlyingDecimals);\nconst qtyScaled64 = Math.round(qty * Math.pow(10, underlyingDecimalsNum));\nconst maxFeesBps64 = Math.round(maxFeesPercent * Math.pow(10, 8));\n\n// --- NONCE ---\nconst now = Date.now() * 1000; // microseconds\n\n// --- ORDER DRAFT ---\nconst orderDraft = {\n  accountId: String(ACCOUNT_ID),\n  symbol,\n  nonce: now,\n  side: SIDE, // \u2190 DYNAMIC SIDE!\n  orderType: ORDER_TYPE,\n  quantity: qty.toFixed(underlyingDecimalsNum),\n  price: \"0\", // MARKET order\n  maxFeesPercent: maxFeesPercent.toFixed(6),\n  creationDeadline: Math.floor(Date.now() / 1000) + 60\n};\n\n// --- SIGNING FIELDS ---\nconst signingFields = {\n  nonce: now,\n  contractId: contractId,\n  quantityScaled64: qtyScaled64,\n  side: SIDE === \"ASK\" ? 0 : 1, // ASK=0, BID=1\n  maxFeesBps64: maxFeesBps64,\n  orderType: ORDER_TYPE\n};\n\nconsole.log(\"\ud83d\udd10 Signing fields:\", JSON.stringify(signingFields, null, 2));\nconsole.log(\"\ud83d\udcdd Order draft:\", JSON.stringify(orderDraft, null, 2));\n\n// --- VALIDATION ---\nif (qtyScaled64 <= 0) {\n    throw new Error(`CRITICAL: quantityScaled64 is ${qtyScaled64}`);\n}\n\nif (maxFeesBps64 <= 0) {\n    throw new Error(`CRITICAL: maxFeesBps64 is ${maxFeesBps64}`);\n}\n\n// --- OUTPUT ---\nreturn [{\n  json: {\n    // Action Info\n    actionInfo: {\n        input: inputJson,\n        detectedAction: detectedAction,\n        side: SIDE,\n        explanation: `Detected \"${detectedAction}\" \u2192 Using SIDE=\"${SIDE}\" (${SIDE === \"BID\" ? \"Buy/Long\" : \"Sell/Short\"})`\n    },\n\n    // Contract info\n    displayName,\n    symbol,\n    contractId,\n    underlyingDecimals,\n    settlementDecimals,\n    tickSize,\n    stepSize,\n    minNotional,\n    minOrderSize,\n\n    // Order draft\n    orderDraft,\n\n    // Signing fields\n    signingFields,\n\n    // Fee info\n    feeInfo: {\n        tradeTakerFeeRate,\n        tradeMakerFeeRate,\n        selectedFeeRate: feeRate,\n        maxFeesPercent,\n        maxFeesBps64\n    },\n\n    // Debug info\n    debug: {\n        balance: balance,\n        spendAmount: spendAmount,\n        markPrice: markPrice,\n        finalQuantity: qty,\n        scaledQuantity: qtyScaled64,\n        estimatedValue: qty * markPrice,\n        detectedSide: SIDE\n    }\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -256,
        256
      ],
      "id": "4ddaaf5d-2bdc-4d66-81b5-cbdf004cabf6",
      "name": "Open Arrange Data"
    },
    {
      "parameters": {
        "url": "https://api.hibachi.xyz/trade/account/info?accountId=13898",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "id": "b729c5f5-004a-4239-8667-a692b8ef2634",
      "name": "Hibachi Account Info",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -16,
        -32
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "404": {
      "main": [
        [
          {
            "node": "TG 404 Error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "429",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "429": {
      "main": [
        [
          {
            "node": "TG 429 Error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Arrange Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1min": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "15min": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "1h": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "404",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dobby": {
      "main": [
        [
          {
            "node": "Hibachi Account Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ticker": {
      "main": [
        [
          {
            "node": "User Ticker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt": {
      "main": [
        [
          {
            "node": "Prompt Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt Check": {
      "main": [
        [
          {
            "node": "Prompt Safe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt Safe": {
      "main": [
        [
          {
            "node": "Dobby",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "User Ticker": {
      "main": [
        [
          {
            "node": "15min",
            "type": "main",
            "index": 0
          },
          {
            "node": "1min",
            "type": "main",
            "index": 0
          },
          {
            "node": "1h",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Arrange Data": {
      "main": [
        [
          {
            "node": "Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MarketInfo": {
      "main": [
        [
          {
            "node": "ExchangeInfo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ticker Param": {
      "main": [
        [
          {
            "node": "MarketInfo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ExchangeInfo": {
      "main": [
        [
          {
            "node": "Open Arrange Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Order Signature": {
      "main": [
        [
          {
            "node": "Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CloseExchangeInfo": {
      "main": [
        [
          {
            "node": "CloseArrange Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CloseArrange Data": {
      "main": [
        [
          {
            "node": "Close Order Signature",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Close Order Signature": {
      "main": [
        [
          {
            "node": "Close Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Close Order": {
      "main": [
        [
          {
            "node": "Ticker Param",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "CloseExchangeInfo",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Ticker Param",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Open Arrange Data": {
      "main": [
        [
          {
            "node": "Order Signature",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Order": {
      "main": [
        [
          {
            "node": "Send msg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hibachi Account Info": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "f1a4301a-0923-4a51-b247-2a8fc945726f",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "uV1g4k73Sgtecd5o",
  "tags": []
}

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

Dobby Hibachi. Uses httpRequest, telegramTrigger, telegram. Event-driven trigger; 29 nodes.

Source: https://gist.github.com/alptugyaman/6f33937faf83cc69556c270d51c43b73 — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

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

Slack & Telegram

N8N Complete Final. Uses telegramTrigger, dataTable, telegram, mqtt. Event-driven trigger; 58 nodes.

Telegram Trigger, Data Table, Telegram +3
Slack & Telegram

TextMain. Uses telegramTrigger, stopAndError, telegram, httpRequest. Event-driven trigger; 56 nodes.

Telegram Trigger, Stop And Error, Telegram +2
Slack & Telegram

Pede Ai. Uses httpRequest, telegram, postgres, telegramTrigger. Event-driven trigger; 53 nodes.

HTTP Request, Telegram, Postgres +1
Slack & Telegram

📄 Documentation: Notion Guide

Telegram Trigger, @Blotato/N8N Nodes Blotato, Telegram +1
Slack & Telegram

Telegram Wait. Uses stickyNote, httpRequest, redis, noOp. Event-driven trigger; 36 nodes.

HTTP Request, Redis, Telegram +1