{
  "name": "Add user authorization layer to your Telegram bot with admin alerts",
  "nodes": [
    {
      "id": "572073b3-d68a-45cb-9c60-cdf3c697b151",
      "name": "Sticky Note - Intro",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3328,
        9664
      ],
      "parameters": {
        "width": 676,
        "height": 720,
        "content": "# 🛡️ BotGuard - Why You Need This\n\n## ⚠️ The Problem\n\nMost Telegram bot examples assume **anyone can use your bot**. There's usually **no protection whatsoever**.\n\nThis is dangerous when your bot:\n- 🤖"
      }
    },
    {
      "id": "635277cb-fa42-4c8c-aaac-373132606208",
      "name": "Sticky Note - Quick Start",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4064,
        9664
      ],
      "parameters": {
        "width": 520,
        "height": 720,
        "content": "# 🚀 Quick Start\n\n## 1️⃣ Configure Your Bot\nEdit **BotGuard Authorization** node:\n- Add your User ID to `AllowedUsers`\n- Add admin User IDs to `Administrators`\n\n## 2️⃣ Get User IDs\n- User sends message"
      }
    },
    {
      "id": "b321fe86-fbf9-4ec6-b7e5-d00735d951ef",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2432,
        9136
      ],
      "parameters": {
        "width": 853,
        "height": 1259,
        "content": "# 🛡️ BotGuard Authorization System\n\n## 📖 Complete Documentation\n\nThis workflow implements Telegram bot authorization with multi-admin notification system.\n\n## 🔑 Configuration Guide\n\n### Edit \"BotGuard"
      }
    },
    {
      "id": "aa9b6109-3e51-4005-802e-29e43fa3e887",
      "name": "BotGuard Authorization",
      "type": "n8n-nodes-base.code",
      "position": [
        3504,
        9168
      ]
    },
    {
      "id": "2957eeff-698e-4166-9c16-600b3adb1a45",
      "name": "Check Authorization",
      "type": "n8n-nodes-base.if",
      "position": [
        3712,
        9168
      ]
    },
    {
      "id": "b50e992a-4e69-4090-8859-68ca85338023",
      "name": "Send Success",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3984,
        9152
      ]
    },
    {
      "id": "a89c3bdf-8669-477d-a47b-0e8e8f1f6ed8",
      "name": "Send Denied",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3984,
        9328
      ]
    },
    {
      "id": "778d438c-d052-4a1a-a110-0f222f537bf9",
      "name": "Check Admin Notify",
      "type": "n8n-nodes-base.if",
      "position": [
        4000,
        9488
      ]
    },
    {
      "id": "97b78d57-a2ea-4fe0-9b93-7b6d1a08ebab",
      "name": "Prepare Admin Notifications",
      "type": "n8n-nodes-base.code",
      "position": [
        4208,
        9488
      ]
    },
    {
      "id": "aa0b65d3-0f22-4f5b-8a09-c146f9fe8a15",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        3312,
        9168
      ]
    },
    {
      "id": "a9ad2dab-53e6-4381-a78c-7d1bb42e1b20",
      "name": "Notify Admin",
      "type": "n8n-nodes-base.telegram",
      "position": [
        4400,
        9488
      ]
    }
  ],
  "connections": {
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "BotGuard Authorization",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Admin Notify": {
      "main": [
        [
          {
            "node": "Prepare Admin Notifications",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Authorization": {
      "main": [
        [
          {
            "node": "Send Success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Denied",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check Admin Notify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BotGuard Authorization": {
      "main": [
        [
          {
            "node": "Check Authorization",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Admin Notifications": {
      "main": [
        [
          {
            "node": "Notify Admin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}