AutomationFlowsSlack & Telegram › Telegram Bot for Budget Queries

Telegram Bot for Budget Queries

Original n8n title: My Workflow 5

My workflow 5. Uses telegramTrigger, telegram, googleSheets. Event-driven trigger; 18 nodes.

Event trigger★★★★☆ complexity18 nodesTelegram TriggerTelegramGoogle Sheets
Slack & Telegram Trigger: Event Nodes: 18 Complexity: ★★★★☆ Added:
Telegram Bot for Budget Queries — n8n workflow card showing Telegram Trigger, Telegram, Google Sheets integration

This workflow follows the Google Sheets → 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": "My workflow 5",
  "nodes": [
    {
      "parameters": {
        "text": "={{ $json.output }}",
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"refs\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"title\": { \"type\": \"string\" },\n          \"link\": { \"type\": \"string\", \"format\": \"uri\" }\n        },\n        \"required\": [\"title\", \"link\"]\n      }\n    }\n  },\n  \"required\": [\"refs\"]\n}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1.2,
      "position": [
        224,
        0
      ],
      "id": "4ae01f4e-5bd1-4d6c-9d50-7f24347920bf",
      "name": "Information Extractor"
    },
    {
      "parameters": {
        "model": "gpt-4.1",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "typeVersion": 1,
      "position": [
        296,
        224
      ],
      "id": "6430cc46-1bfb-4238-b37a-be0f19e1f07b",
      "name": "Azure OpenAI Chat Model6",
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineAll",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        928,
        148
      ],
      "id": "539e510d-8534-4158-9c65-5d58d1d760ef",
      "name": "Merge"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "6c751610-8f61-4663-8e1f-7920c1c3160b",
              "name": "refs",
              "value": "={{ $json.output.refs }}",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        640,
        0
      ],
      "id": "4d843af5-8ae8-491f-a11f-12eb986b22d3",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "={\n  \"type\":\"object\",\n  \"properties\":{\n\n        \"error\":{\n          \"type\":\"object\",\n            \"properties\":{\n              \"error_code\":{\"type\":\"string\"},\n              \"error_description\":{\"type\":\"string\"},\n              \"original_command\":{\"type\":\"string\"},\n              \"fixed_command\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\n              \"explanation\":{\"type\":\"string\"},\n              \"related_documentation\":{\n                \"type\":\"array\",\n                \"items\":{\"type\":\"string\"}\n              }\n            }\n        }\n\n  }\n}"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        16,
        688
      ],
      "id": "8014678e-71c5-438a-93b3-68e980082856",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "model": "gpt-4.1",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "typeVersion": 1,
      "position": [
        -752,
        688
      ],
      "id": "2b087c73-694f-421f-a0c4-23ed81e5e6f3",
      "name": "Azure OpenAI Chat Model",
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4.1",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "typeVersion": 1,
      "position": [
        -432,
        1088
      ],
      "id": "59c09c1b-f99e-4e66-acce-4a7c7f5ea3b4",
      "name": "Azure OpenAI Chat Model1",
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "endpointUrl": "https://knowledge-mcp.global.api.aws",
        "serverTransport": "httpStreamable",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1.1,
      "position": [
        -304,
        268
      ],
      "id": "21fab989-9589-4edf-aef2-dfc7e5520c42",
      "name": "AWSDOC"
    },
    {
      "parameters": {
        "endpointUrl": "https://mcp.context7.com/mcp",
        "serverTransport": "httpStreamable",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1.1,
      "position": [
        -176,
        268
      ],
      "id": "31c75703-886e-45d2-b6b0-320c844e9125",
      "name": "Context7MCP"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=<Instruction>\nYour primary responsibility is to create actionable, risk-aware work plans based on user input.\nIdentify and summarize all potential risks, version-specific changes, breaking changes, and interruption possibilities.\nReference authoritative documentation (AWS official docs, Context7 MCP) for every step; always provide source links.\nUse a command-oriented, concise tone throughout.\nBegin with a Table of Contents.\nNumber and title each stage clearly.\nDefine all script variables at the top.\nEmphasize commands using Markdown (**bold**/`inline code`).\nPresent scripts sequentially, one at a time.\nOutput must be in English.\nEnd the document immediately after the final stage/script, with no closing remarks or conclusions.\nWhen modifications are required, preserve original content and only apply minimal necessary changes.\nAlways refer to official documentation when new technologies are proposed.\n</Instruction>\n<Agent>\nYou are an Agent dedicated to producing precise, risk-focused cloud work plans.\nFor every user request, analyze and document all relevant risks, version changes, and interruption factors.\nLeverage AWS Knowledge MCP and Context7 MCP to ensure all guidance is authoritative and up-to-date.\nYour output must be clear, actionable, and enable safe execution by humans.\nInclude copy-paste-ready variables, sequential scripts, and source links for every referenced document.\nIf any required input is missing, request it at the end.\n</Agent>\n{{ $('Webhook').item.json.body.query }}",
        "options": {
          "maxIterations": 7
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -440,
        44
      ],
      "id": "c3b7cbf5-f159-46c3-8cc0-293d7c5e77c2",
      "name": "\ubb38\uc11c \uc870\ud68c"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Webhook').item.json.body.sessionId }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        712,
        520
      ],
      "id": "1eb28e55-09c1-42c2-a171-0a30c0b552b5",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "model": "gpt-4.1",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "typeVersion": 1,
      "position": [
        584,
        520
      ],
      "id": "f5d45765-1783-47ad-a6e2-f6be36ef152e",
      "name": "Azure OpenAI Chat Model2",
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4.1",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "typeVersion": 1,
      "position": [
        -560,
        268
      ],
      "id": "3ee4f7f1-3f01-494e-a4f1-3e0f86185676",
      "name": "Azure OpenAI Chat Model3",
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Webhook').item.json.body.query }}\n\n",
        "options": {
          "systemMessage": "\ub2f9\uc2e0\uc758 \uc5c5\ubb34\ub294 \ud074\ub77c\uc6b0\ub4dc \ub9ac\uc18c\uc2a4 \uc791\uc5c5 \uacc4\ud68d\uc11c\ub97c \uc218\uc815\ud558\ub294 \uc77c\uc785\ub2c8\ub2e4. \uae30\uc874\uc758 \uc791\uc5c5 \uacc4\ud68d\uc11c\uc640 \ubc1c\uc0dd\ud55c \uc624\ub958 \uba85\ub839\uc5b4, \ud574\uacb0 \ubc29\uc548\uc744 \ubcf4\uace0 \uc791\uc5c5 \uacc4\ud68d\uc11c\ub97c \uc218\uc815\ud558\uc138\uc694. \uc218\uc815\ud560 \ub54c\ub294 \uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud55c \uba85\ub839\uc5b4\ub9cc \uc218\uc815\ud558\uace0 \ub2e4\ub978 \ub0b4\uc6a9\uc740 \uc808\ub300 \uac74\ub4e4\uc9c0 \ub9c8\uc138\uc694. \ub2f5\ubcc0\uc740 \uc218\uc815\ub41c \uc791\uc5c5 \uacc4\ud68d\uc11c \uc804\uccb4 \ub0b4\uc6a9\uc744 \ucd9c\ub825\ud574\uc8fc\uc138\uc694.\n\ucc38\uace0\ud560 \uae30\uc874 \uc791\uc5c5 \uacc4\ud68d\uc11c\uac00 \uc5c6\ub2e4\uba74 \uc791\uc5c5 \uacc4\ud68d\uc11c\ub97c \uba3c\uc800 \ub9cc\ub4e4\uc5b4\ub2ec\ub77c\uace0 \uc720\uc800\uc5d0\uac8c \uc694\uccad\ud558\uc138\uc694."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -440,
        864
      ],
      "id": "9f34a068-e8b9-48f3-869b-011c7b70a10d",
      "name": "\uacc4\ud68d\uc11c \uc218\uc815"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=\ub2e4\uc74c \uc0ac\uc6a9\uc790\uc758 \uc9c8\ubb38\uc744 \ubcf4\uace0 cli\uc5d0\uc11c \ubc1c\uc0dd\ud55c \uc5d0\ub7ec\ub97c \ud574\uacb0\ud574\uc8fc\uc138\uc694.\n\uba3c\uc800 \uacfc\uac70\uc758 \uc5d0\ub7ec \ubc1c\uc0dd \ub370\uc774\ud130\ub97c \ud655\uc778\ud574\uc11c \ube44\uc2b7\ud55c \uc5d0\ub7ec\uac00 \uc788\uc5c8\ub2e4\uba74 \ud574\ub2f9 \ub370\uc774\ud130\ub97c \ud65c\uc6a9\ud574\uc11c \ub2f5\ubcc0\ud574\uc8fc\uc138\uc694.\n\ub9cc\uc57d \uae30\uc874\uc5d0 \uc5c6\uc5c8\ub358 \uc5d0\ub7ec\ub77c\uba74 \uc0c8\ub85c \uc5d0\ub7ec \ubc1c\uc0dd \ub370\uc774\ud130\ub97c \uc0dd\uc131\ud574\uc11c supabase DB\uc5d0 \uc800\uc7a5\ud574\uc8fc\uc138\uc694.\n\n\uc0ac\uc6a9\uc790 \uc9c8\ubb38:\n{{ $('Webhook').item.json.body.query }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=\ub2f9\uc2e0\uc740 AWS CLI \uba85\ub839\uc5b4 \uc624\ub958\ub97c \ud574\uacb0\ud558\uace0, \uc624\ub958 \ud574\uacb0 \uc815\ubcf4\ub97c \uad6c\uc870\ud654\ub41c JSON \ud615\ud0dc\ub85c \ucd9c\ub825\ud558\ub294 AI \uc5d0\uc774\uc804\ud2b8\uc785\ub2c8\ub2e4.\n\uc0ac\uc6a9\uc790\uac00 \uc785\ub825\ud55c AWS CLI \uba85\ub839\uc5b4\uc640 \uc5d0\ub7ec \uba54\uc2dc\uc9c0\ub97c \uae30\ubc18\uc73c\ub85c \uc624\ub958 \uc6d0\uc778\uc744 \ubd84\uc11d\ud558\uace0, \ud574\uacb0\uc744 \uc704\ud55c \uc815\ud655\ud55c \uba85\ub839\uc5b4\ub97c \uc81c\uc2dc\ud558\uba70, RAG\uc5d0 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 \uad6c\uc870\ud654\ub41c \ub370\uc774\ud130\ub97c \uc0dd\uc131\ud574\uc57c \ud569\ub2c8\ub2e4.\n\uc0ac\uc6a9\uc790\ub294 \ub2e4\uc74c \ub450 \uac00\uc9c0\ub97c \uc785\ub825\ud569\ub2c8\ub2e4\n- CLI \uba85\ub839\uc5b4: original_command\n- \uc5d0\ub7ec \uba54\uc2dc\uc9c0: error_description\n\uba85\ub839\uc5b4\ub97c \uc81c\uc678\ud558\uace0 \ud55c\uad6d\uc5b4\ub85c \ucd9c\ub825\ud574\uc8fc\uc138\uc694.\n\n\uc5d0\ub7ec\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574 \uba3c\uc800 \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ud655\uc778\ud558\uc5ec \uae30\uc874\uc5d0 \ud574\uacb0\ud55c \uc5d0\ub7ec\uc778\uc9c0 \uccb4\ud06c\ud558\uc138\uc694."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -440,
        464
      ],
      "id": "e50cf424-b39d-4f1b-9510-6480c833773c",
      "name": "\uc624\ub958 \ud574\uacb0"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=<Instruction>\nCreate a work plan based on the user\u2019s input.\nUse a formal, concise tone.\nMake it command-oriented; give brief explanations.\nOutput as a Markdown document, but never starts with \"```markdown\".\nInclude a Table of Contents at the top.\nStructure clear, numbered stages with headings.\nDefine all script variables at the very top.\nEmphasize commands with Markdown (**bold**/`inline code`); avoid the \u201cA: b\u201d style.\nEnsure variables and scripts are copy-paste ready.\nPresent scripts one at a time (sequential).\nFinal output language must be Korean.\nEnd the document without any closing remark; no conclusions or sign-offs. The document must end immediately after the final stage/script.\n</instruction>\n<Agent> An Agent that authors precise cloud change execution plans using AWS CLI and shell scripts. It leverages context7 for runtime context retrieval and aws knowledge mcp for authoritative AWS guidance. The plan must clearly convey intent and end-to-end flow so a human can execute safely and trace decisions. It outputs formal Markdown with copy-paste-ready variables and sequential scripts, requesting any missing inputs at the end. </Agent>\nUser: {{ $('Webhook').item.json.body.query }}\nDocs: {{ $json.output }}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        576,
        296
      ],
      "id": "cfa2fe28-b0db-4851-bf85-e1a30830a508",
      "name": "makeplan"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "3c7a53f9-689e-4c4f-8cde-7cc487189bb4",
        "responseMode": "lastNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -1776,
        748
      ],
      "id": "acb39fdd-a89a-4ac9-b1f0-548856e2d236",
      "name": "Webhook"
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"result\": {\n\t\t\t\"type\": \"number\"\n\t\t}\n\t}\n}"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -1416,
        972
      ],
      "id": "f52ed5ba-c1da-41f7-bff2-834029464363",
      "name": "Structured Output Parser1"
    },
    {
      "parameters": {
        "model": "gpt-4.1",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "typeVersion": 1,
      "position": [
        -1544,
        972
      ],
      "id": "5849775f-724f-4716-a883-0afbc27e9935",
      "name": "Azure OpenAI Chat Model4",
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "7d95bb6b-7d9e-42b2-b394-e0d9126fae15",
              "leftValue": "={{ $json.output.result }}",
              "rightValue": 1,
              "operator": {
                "type": "number",
                "operation": "lte"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -1200,
        748
      ],
      "id": "bafdc58b-6bb0-4ca4-a32a-b9a8bace3c92",
      "name": "If"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "e1547262-8fff-4e54-9488-a0eaac3f78ad",
              "leftValue": "={{ $json.output.result }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -976,
        348
      ],
      "id": "e5722529-9af4-4a5c-987a-a6cc82495245",
      "name": "If1"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "78232f41-9185-457a-9eb2-1b4340784687",
              "leftValue": "={{ $json.output.result }}",
              "rightValue": 2,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -976,
        1168
      ],
      "id": "cb74b161-0bb6-49e5-9af3-1d1b89a3eca3",
      "name": "If2"
    },
    {
      "parameters": {
        "model": "gpt-4.1",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "typeVersion": 1,
      "position": [
        -432,
        1592
      ],
      "id": "7cef5078-d455-497c-9a17-5a11a81a0d9f",
      "name": "Azure OpenAI Chat Model5",
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## EKS \ubc84\uc804 1.28\uc5d0\uc11c 1.30\uc73c\ub85c \uc5c5\uadf8\ub808\uc774\ub4dc \ud558\ub294 \uc791\uc5c5\uacc4\ud68d\uc11c \uc791\uc131\ud574\uc918\n\n## $aws eks describe-cluster --name production-eks-cluster --region ap-northeast-2\n## An error occurred (InvalidAccessKeyId) when calling the PutObject operation: The AWS Access Key Id you provided does not exist in our records.\n\n## \uc5d0\ub7ec\ub97c \ud574\uacb0\ud55c \uba85\ub839\uc5b4\ub97c \uc801\uc6a9\ud574\uc11c \uc791\uc5c5\uacc4\ud68d\uc11c\ub97c \uc218\uc815\ud574\uc918\n\n# \uace0\ub9c8\uc6cc",
        "height": 592,
        "width": 880,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -64,
        1024
      ],
      "id": "e85acf0a-8487-4156-94d9-a70fb7899671",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "# Supabase Credential \uc124\uc815\ubc95\n## Host : https://ckolilumwmotfjajnwqb.supabase.co\n## API Key : <redacted-credential>\n\n\n\n8\uc2dc\uc5d0 \ub3cc\uc544\uc62c\uac8c\uc694",
        "height": 432,
        "width": 752
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        896,
        1088
      ],
      "id": "b3d8f1b4-88db-47f0-9ebb-32750481bf35",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Webhook').item.json.body.sessionId }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -304,
        1088
      ],
      "id": "8411e8b1-7b8a-4273-a878-d4f0bd652dbc",
      "name": "Simple Memory1"
    },
    {
      "parameters": {
        "jsCode": "return [\n  {\n    json: {\n      output: $('\uc624\ub958 \ud574\uacb0').first().json.output.error.explanation + '\\n\\n' + $('\uc624\ub958 \ud574\uacb0').first().json.output.error.fixed_command.join('\\n\\n')\n    }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        288,
        568
      ],
      "id": "4c130535-e492-49c5-a882-c70dc5068bf7",
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Webhook').item.json.body.sessionId }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -624,
        688
      ],
      "id": "35412f10-9605-4d22-b5ef-34b08dcbe6a1",
      "name": "Simple Memory2"
    },
    {
      "parameters": {
        "operation": "getAll",
        "tableId": "prompthon",
        "limit": 10,
        "filterType": "none"
      },
      "type": "n8n-nodes-base.supabaseTool",
      "typeVersion": 1,
      "position": [
        -496,
        688
      ],
      "id": "5846b3e0-f8ef-4009-896e-573ab12d93fb",
      "name": "Get many rows in Supabase",
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "tableId": "prompthon",
        "dataToSend": "autoMapInputData"
      },
      "type": "n8n-nodes-base.supabaseTool",
      "typeVersion": 1,
      "position": [
        -368,
        688
      ],
      "id": "a3c601c5-84fb-4e02-ba7b-705e1491830f",
      "name": "Create a row in Supabase",
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Webhook').item.json.body.query }}\n",
        "options": {
          "systemMessage": "\ub2f9\uc2e0\uc758 \uc5c5\ubb34\ub294 \uc0ac\uc6a9\uc790\uac00 \ud074\ub77c\uc6b0\ub4dc \ub9ac\uc18c\uc2a4 \uc791\uc5c5 \uc774\uc678\uc758 \uc9c8\ubb38\uc744 \ud560 \ub54c \uc751\ub2f5\ud558\ub294 \uac83 \uc785\ub2c8\ub2e4. \uc815\ud574\uc9c4 \uae30\ub2a5\uc744 \uc218\ud589\ud558\uc9c0 \uc54a\ub294 \uc0ac\uc6a9\uc790\uac00 \ub9c8\uc74c\uc5d0 \ub4e4\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \uae4c\uce60\ud55c \uc5b4\uc870\ub97c \uc720\uc9c0\ud558\uc138\uc694."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -440,
        1368
      ],
      "id": "061b3a47-a2b9-46ea-b582-72cd5cc87bfc",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Webhook').item.json.body.sessionId }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -304,
        1592
      ],
      "id": "c5b536e2-a327-4b50-a669-b73c531173b7",
      "name": "Simple Memory3"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.body.query }}",
        "hasOutputParser": true,
        "messages": {
          "messageValues": [
            {
              "message": "=\ub2f9\uc2e0\uc758 \uc5c5\ubb34\ub294 \uc0ac\uc6a9\uc790\uc758 \uc785\ub825 \uba54\uc138\uc9c0\ub97c \ubd84\uc11d\ud558\uc5ec \uc801\uc808\ud55c agent\ub85c \ubc30\uc815\ud558\ub294 \uc5ed\ud560\uc785\ub2c8\ub2e4. \n\uc785\ub825\uc774 '\uc791\uc5c5\uacc4\ud68d\uc11c \uc791\uc131'\uc5d0 \uad00\ud55c \ub0b4\uc6a9\uc774\uba74 '0'\uc744 \ub9ac\ud134\ud558\uc138\uc694. \n'CLI \uba85\ub839\uc5b4 \uc5d0\ub7ec'\uc5d0 \uad00\ud55c \ub0b4\uc6a9\uc774\uba74 '1'\uc744 \ub9ac\ud134\ud558\uc138\uc694. \n'\uc791\uc5c5\uacc4\ud68d\uc11c \uc218\uc815'\uc5d0 \uad00\ud55c \ub0b4\uc6a9\uc774\uba74 '2'\ub97c \ub9ac\ud134\ud558\uc138\uc694. \n\uc544\ubb34 \ubd84\uc57c\uc5d0\ub3c4 \ud574\ub2f9\ub418\uc9c0 \uc54a\uc73c\uba74 '3'\uc744 \ub9ac\ud134\ud558\uc138\uc694."
            }
          ]
        },
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        -1552,
        748
      ],
      "id": "cd32d83e-ee5e-4247-b017-26fad9794da6",
      "name": "\uc9c8\ubb38 \ubd84\ub958\uae30"
    },
    {
      "parameters": {
        "endpointUrl": "https://knowledge-mcp.global.api.aws",
        "serverTransport": "httpStreamable",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1.1,
      "position": [
        -240,
        688
      ],
      "id": "b5ece7a5-6526-4d23-8969-2a17d1e8ef1b",
      "name": "AWSDOC1"
    },
    {
      "parameters": {
        "endpointUrl": "https://mcp.context7.com/mcp",
        "serverTransport": "httpStreamable",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1.1,
      "position": [
        -112,
        688
      ],
      "id": "0006c01c-396b-425d-a60e-26ba19a514fa",
      "name": "Context7MCP1"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Webhook').item.json.body.sessionId }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -432,
        268
      ],
      "id": "841f67c2-e06d-4d2c-b117-4e95bc1898fb",
      "name": "Simple Memory4"
    }
  ],
  "connections": {
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model6": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "\uc624\ub958 \ud574\uacb0",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "\uc624\ub958 \ud574\uacb0",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "\uacc4\ud68d\uc11c \uc218\uc815",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AWSDOC": {
      "ai_tool": [
        [
          {
            "node": "\ubb38\uc11c \uc870\ud68c",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Context7MCP": {
      "ai_tool": [
        [
          {
            "node": "\ubb38\uc11c \uc870\ud68c",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "\ubb38\uc11c \uc870\ud68c": {
      "main": [
        [
          {
            "node": "makeplan",
            "type": "main",
            "index": 0
          },
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "makeplan",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "makeplan",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "\ubb38\uc11c \uc870\ud68c",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "\uc9c8\ubb38 \ubd84\ub958\uae30",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "\uc9c8\ubb38 \ubd84\ub958\uae30",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "\uc9c8\ubb38 \ubd84\ub958\uae30",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "\ubb38\uc11c \uc870\ud68c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\uc624\ub958 \ud574\uacb0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "\uacc4\ud68d\uc11c \uc218\uc815",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model5": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "makeplan": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "\uc624\ub958 \ud574\uacb0": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory1": {
      "ai_memory": [
        [
          {
            "node": "\uacc4\ud68d\uc11c \uc218\uc815",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        []
      ]
    },
    "Simple Memory2": {
      "ai_memory": [
        [
          {
            "node": "\uc624\ub958 \ud574\uacb0",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Get many rows in Supabase": {
      "ai_tool": [
        [
          {
            "node": "\uc624\ub958 \ud574\uacb0",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create a row in Supabase": {
      "ai_tool": [
        [
          {
            "node": "\uc624\ub958 \ud574\uacb0",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory3": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "\uc9c8\ubb38 \ubd84\ub958\uae30": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AWSDOC1": {
      "ai_tool": [
        [
          {
            "node": "\uc624\ub958 \ud574\uacb0",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Context7MCP1": {
      "ai_tool": [
        [
          {
            "node": "\uc624\ub958 \ud574\uacb0",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory4": {
      "ai_memory": [
        [
          {
            "node": "\ubb38\uc11c \uc870\ud68c",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "06833255-67ad-4537-8828-94d20c3f54a8",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "wI3HxNSL2pSjKSJ8",
  "tags": [
    {
      "createdAt": "2025-09-18T11:44:58.076Z",
      "updatedAt": "2025-09-18T11:44:58.076Z",
      "id": "OogcyyzO5q2XCPIg",
      "name": "prompthon"
    }
  ]
}

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

How this works

This workflow streamlines customer interactions by automating responses to Telegram messages, enabling businesses to efficiently handle enquiries about products or services while logging details for follow-up. It's ideal for small business owners or customer support teams managing high-volume chats without constant manual intervention, saving hours on repetitive tasks. The key step involves a switch node that routes incoming messages to appropriate replies or data capture, seamlessly integrating with Google Sheets to store chat IDs, categories, and budgets for easy tracking and analysis.

Use this workflow when you need real-time automation for Telegram-based customer service, such as qualifying leads by category and budget before escalating to human agents. Avoid it for non-event-driven scenarios like scheduled reports, or if your team prefers email over messaging apps. Common variations include adding email notifications after sheet updates or expanding the switch logic to handle multiple languages.

About this workflow

My workflow 5. Uses telegramTrigger, telegram, googleSheets. Event-driven trigger; 18 nodes.

Source: https://github.com/FlowLogicLabs/telegram-laptop-sales-bot/blob/main/catalogue/workflow/telegram_laptop_sales_bot.json — 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

This workflow provides a complete solution for handling Telegram Stars payments, invoicing and refunds using n8n. It automates the process of sending invoices, managing pre-checkout approvals, recordi

HTTP Request, Execute Workflow Trigger, Google Sheets +2
Slack & Telegram

clients kept booking meetings during my prayer times. i'd either miss a prayer or scramble to reschedule. the problem wasn't the clients — it was that my calendar had no blocked windows for salah. i n

Telegram Trigger, HTTP Request, Google Calendar +3
Slack & Telegram

This workflow is a powerful reputation management tool designed to proactively filter customer reviews. It helps you encourage positive reviews on Google while capturing negative feedback privately be

Telegram Trigger, Google Sheets, Telegram
Slack & Telegram

This workflow is designed to automate your e-commerce order processing by instantly syncing new Jotform submissions with your internal systems and immediately notifying the customer on Telegram.

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

This template is perfect for freelancers, small business owners, or financial assistants who want to record and approve financial transactions like income and expenses directly from Telegram, without

Telegram Trigger, Telegram, Google Sheets