{
  "name": "Telegram bot starter template setup & AI agent chatbot",
  "nodes": [
    {
      "id": "5d9cf2ce-4808-4d44-9f0d-2c15d8dcea91",
      "name": "Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -440,
        340
      ]
    },
    {
      "id": "22fc0669-96f2-4767-9bc2-03644c7ced21",
      "name": "Global data",
      "type": "n8n-nodes-base.set",
      "position": [
        -200,
        340
      ]
    },
    {
      "id": "d5925fd8-abde-45bf-ac3d-22649ecb1f4e",
      "name": "Telegram1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1700,
        -360
      ]
    },
    {
      "id": "5dc06f04-26b4-45af-99d6-a06b7c1b936d",
      "name": "Telegram2",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1700,
        -120
      ]
    },
    {
      "id": "d036c602-17bb-45b5-b7b0-331339570cb3",
      "name": "Telegram3",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1260,
        460
      ]
    },
    {
      "id": "a86fe429-65df-471b-bdcb-e4765b14f109",
      "name": "Telegram4",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1940,
        -740
      ]
    },
    {
      "id": "b28ef71b-4e4b-48cb-b64d-029feee13ee4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        360
      ],
      "parameters": {
        "width": 1200.5980355767667,
        "height": 326.00218267794156,
        "content": "## Callback"
      }
    },
    {
      "id": "d51d4ac4-e182-4245-b26f-248f99235de8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        -920
      ],
      "parameters": {
        "width": 1201,
        "height": 481,
        "content": "## Text\n"
      }
    },
    {
      "id": "05754c06-8f64-44c6-be55-3eb480e0cb3d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        -400
      ],
      "parameters": {
        "width": 1200.5980355767667,
        "height": 198.69915410333263,
        "content": "## Photo"
      }
    },
    {
      "id": "d9906042-25cd-4812-bbf1-4c46aa2c0492",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        -160
      ],
      "parameters": {
        "width": 1200.5980355767667,
        "height": 198.69915410333263,
        "content": "## File"
      }
    },
    {
      "id": "0e0bfc7f-23a3-478e-a3a1-cffbc9f9f95e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        100
      ],
      "parameters": {
        "width": 1200.5980355767667,
        "height": 198.69915410333263,
        "content": "## Voice"
      }
    },
    {
      "id": "a4519088-76c3-427c-95b6-7982814bf8e3",
      "name": "Telegram5",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1700,
        140
      ]
    },
    {
      "id": "0b597db9-d240-4be3-90f3-095117b1c6bc",
      "name": "Switch_MessageType",
      "type": "n8n-nodes-base.switch",
      "position": [
        720,
        -120
      ]
    },
    {
      "id": "efb08696-e76f-494c-8872-d117a379adec",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        -1460
      ],
      "parameters": {
        "width": 1776,
        "height": 501,
        "content": "## Commands"
      }
    },
    {
      "id": "7edecce3-6371-45ab-8dc1-f3e1a2052daa",
      "name": "Telegram6",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1840,
        -1180
      ]
    },
    {
      "id": "c3b030e2-a085-4e21-8645-0224d6bb7c35",
      "name": "Menu",
      "type": "n8n-nodes-base.switch",
      "position": [
        1420,
        460
      ]
    },
    {
      "id": "71907904-21f3-459c-a445-ca44a432dd36",
      "name": "Command?",
      "type": "n8n-nodes-base.if",
      "position": [
        1340,
        -760
      ]
    },
    {
      "id": "23e5c351-095b-4485-ad09-4dc4df195a8d",
      "name": "Change status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1460,
        1220
      ]
    },
    {
      "id": "12e9c69a-ac4d-4c1b-ba2e-18602a1ac715",
      "name": "Start bot?",
      "type": "n8n-nodes-base.if",
      "position": [
        1260,
        1040
      ]
    },
    {
      "id": "b60a7063-a62f-4fbe-bc33-40ff55170f3e",
      "name": "Register",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1660,
        920
      ]
    },
    {
      "id": "6a7249dd-f664-4115-a907-883d1da4e1c5",
      "name": "Payment Handler",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1460,
        1660
      ]
    },
    {
      "id": "586f875f-e119-467e-8a3d-6090b8eaed80",
      "name": "Trigger Data for Payment",
      "type": "n8n-nodes-base.set",
      "position": [
        1280,
        1660
      ]
    },
    {
      "id": "f6f231a0-f5b7-4e58-acda-4f8dfe46a666",
      "name": "Trigger Data for Register",
      "type": "n8n-nodes-base.set",
      "position": [
        1460,
        920
      ]
    },
    {
      "id": "b7287bcc-b4d0-4b42-bdfc-eeb8c1a0c289",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -20,
        340
      ]
    },
    {
      "id": "509c5575-2226-486c-8398-887eb69a74f8",
      "name": "Data for Invoice",
      "type": "n8n-nodes-base.set",
      "position": [
        1840,
        -1380
      ]
    },
    {
      "id": "6634d3a8-848a-4a14-ba37-58f33e3409f2",
      "name": "Send Invoice",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        2040,
        -1380
      ]
    },
    {
      "id": "e4bef639-3451-4ddc-ad26-481ba2acf33d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        820
      ],
      "parameters": {
        "width": 1417,
        "height": 613,
        "content": "## New member or Member left"
      }
    },
    {
      "id": "4affaf7d-0694-4aa0-9616-8e12ca5bee15",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        1500
      ],
      "parameters": {
        "width": 1217,
        "height": 577,
        "content": "## Payment handler"
      }
    },
    {
      "id": "58008f10-7336-4633-ab15-51556e3b53bd",
      "name": "Switch_Commands",
      "type": "n8n-nodes-base.switch",
      "position": [
        1540,
        -1280
      ]
    },
    {
      "id": "1a8af547-3492-4a07-9ab3-39f0fba25f0e",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -520,
        100
      ],
      "parameters": {
        "width": 260,
        "height": 400,
        "content": "### 🚀 Set up Telegram Trigger\n\n1. Create a bot via [@BotFather](https://t.me/BotFather) and copy the **Bot Token**.\n2. Connect it to this node\n\n📝 Tip: Send `/start` to your bot in Telegram to trigger "
      }
    },
    {
      "id": "15fb1560-8ac2-43b6-809e-a794bdb48cda",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1860,
        860
      ],
      "parameters": {
        "width": 360,
        "height": 460,
        "content": "### 👋 New member joined? Register them automatically!\n\nUse this node when someone joins or leaves your Telegram group.\n\nPair it with the [n8n Telegram Payment & Registration Workflow ⭐️](https://vikto"
      }
    },
    {
      "id": "ffca62ab-00b4-4b0c-931c-08124fee3bdd",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        1540
      ],
      "parameters": {
        "width": 400,
        "height": 420,
        "content": "### 💸 Telegram Payments Made Easy with n8n\n\nThis ready-to-use workflow helps you:\n\n- ✅ Accept payments **directly in Telegram**\n- 👤 Automatically **register paying users**\n- ⏳ Control access based on "
      }
    },
    {
      "id": "9a6be66e-7e2a-4235-b358-d45d7c66cdde",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2280,
        -1420
      ],
      "parameters": {
        "width": 400,
        "height": 420,
        "content": "### 💸 Telegram Payments Made Easy with n8n\n\nThis ready-to-use workflow helps you:\n\n- ✅ Accept payments **directly in Telegram**\n- 👤 Automatically **register paying users**\n- ⏳ Control access based on "
      }
    },
    {
      "id": "e25379f9-1a25-477e-b65a-a5a6ed30efbd",
      "name": "TextDataExample",
      "type": "n8n-nodes-base.set",
      "position": [
        -200,
        160
      ]
    },
    {
      "id": "5f3f8ab0-208d-4f10-b259-5014470e785a",
      "name": "Agent: Find in the Internet",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        2860,
        -420
      ]
    },
    {
      "id": "ab42d6cd-cd08-42e2-a3ed-5d4b9f56a7e0",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1600,
        -740
      ]
    },
    {
      "id": "8bdf237f-fbe0-47de-80b3-98f846c4a874",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1700,
        -580
      ]
    },
    {
      "id": "5764520d-9be5-489a-8323-0fc96a1ea1fa",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1580,
        -580
      ]
    },
    {
      "id": "4f507f23-8517-479a-82c1-62034a30964e",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2220,
        -920
      ],
      "parameters": {
        "width": 500,
        "height": 480,
        "content": "### 🧪 Basic AI agent for testing and play\n\nThis setup is a **lightweight prototype** that lets you:\n\n- 💬 Chat with an AI via Telegram  \n- 🧠 Retain short context (3 messages) per user  \n- 🔁 Explore how"
      }
    },
    {
      "id": "85ecf7b0-1c85-4fc8-9aec-62d3abf563a1",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2780,
        -920
      ],
      "parameters": {
        "width": 1260,
        "height": 300,
        "content": "## 🤖 Supercharge Your Bot with Task-YOUR_OPENAI_KEY_HERE AI Agents\n\n### Transform your Telegram bot from a simple responder into a **versatile business assistant** powered by modular AI agents. Each a"
      }
    },
    {
      "id": "c376adc1-e468-4320-9b1f-3d79fcd8a575",
      "name": "Agent: Check Order Status",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        3380,
        -420
      ]
    },
    {
      "id": "c0a0c774-3257-467b-8bee-bb17297a13d8",
      "name": "Agent: Search Internal Docs",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        3120,
        -420
      ]
    },
    {
      "id": "befaa35a-f56b-4918-b597-dd69e7c95900",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2780,
        -580
      ],
      "parameters": {
        "width": null,
        "height": 340,
        "content": "### 🌐 **Agent: Find in the Internet**  \n  → Searches live data online to answer fresh, time-sensitive queries."
      }
    },
    {
      "id": "dade8080-91be-47ad-a15a-2d70ef7d8429",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3040,
        -580
      ],
      "parameters": {
        "width": null,
        "height": 340,
        "content": "### 📁 **Agent: Search Internal Docs**  \n  → Fetches relevant answers from your internal knowledge base (Notion, Google Drive, etc.)."
      }
    },
    {
      "id": "4850057e-ef20-4067-9e64-f02bec9d49d9",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3300,
        -580
      ],
      "parameters": {
        "width": null,
        "height": 340,
        "content": "### 📦 **Agent: Check Order Status** \n  → Instantly checks order progress from Google Sheets, Airtable, or CRM."
      }
    },
    {
      "id": "cdab4f13-dc58-4b9b-89e3-c42a147fc95a",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3560,
        -580
      ],
      "parameters": {
        "width": null,
        "height": 340,
        "content": "### 💰 **Agent: Calculate Cost or Quote**  \n  → Generates quotes using predefined pricing logic based on user input. "
      }
    },
    {
      "id": "2fcb9768-9d99-4541-b5cb-274988154b74",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3820,
        -580
      ],
      "parameters": {
        "width": null,
        "height": 340,
        "content": "##### ❓ Need help with your own?\n\n\n\n## Share your idea and get the estimation for your agent. \n\n### [Fill the form →](https://tally.so/r/wQaeJA)"
      }
    },
    {
      "id": "865b678f-5841-4c24-a0c2-8a11ba550b0c",
      "name": "Agent: Calculate Cost or Quote",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        3640,
        -420
      ]
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Switch_MessageType",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Start bot?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Trigger Data for Payment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger": {
      "main": [
        [
          {
            "node": "Global data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Telegram4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Command?": {
      "main": [
        [
          {
            "node": "Switch_Commands",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram3": {
      "main": [
        [
          {
            "node": "Menu",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram4": {
      "main": [
        []
      ]
    },
    "Start bot?": {
      "main": [
        [
          {
            "node": "Trigger Data for Register",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Change status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Global data": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Switch_Commands": {
      "main": [
        [
          {
            "node": "Data for Invoice",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data for Invoice": {
      "main": [
        [
          {
            "node": "Send Invoice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Switch_MessageType": {
      "main": [
        [
          {
            "node": "Command?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Data for Payment": {
      "main": [
        [
          {
            "node": "Payment Handler",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Data for Register": {
      "main": [
        [
          {
            "node": "Register",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent: Search Internal Docs": {
      "ai_tool": [
        []
      ]
    }
  }
}