{
  "name": "Telegram chat access control with user permission database",
  "nodes": [
    {
      "id": "c9472226-bbf2-48a8-b504-c2e0bac6fedc",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -48,
        -96
      ]
    },
    {
      "id": "032bed96-34be-465f-90fd-a7e9c9fe4982",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1184,
        -112
      ],
      "parameters": {
        "width": null,
        "height": 384,
        "content": "## Input data\nThread to connect Credential to connect with"
      }
    },
    {
      "id": "8182317e-d432-48b4-ae2f-133200e4fdb2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -912,
        -112
      ],
      "parameters": {
        "width": null,
        "height": 384,
        "content": "## Table with a list of employees \nSelect the created Data table (you can choose either Google Sheets or Airtable)"
      }
    },
    {
      "id": "c04f2648-5327-46d3-a49f-d88f85922ce5",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -112
      ],
      "parameters": {
        "width": null,
        "height": 384,
        "content": "## Employee access filter\nnames - access statuses"
      }
    },
    {
      "id": "bf553e89-9301-48c1-93b7-c5ebe2ee302f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        -112
      ],
      "parameters": {
        "width": null,
        "height": 384,
        "content": "## Response when access is denied"
      }
    },
    {
      "id": "4f8ca4cb-f15d-4743-8b26-76fee1e8478c",
      "name": "Permission",
      "type": "n8n-nodes-base.switch",
      "position": [
        -576,
        96
      ]
    },
    {
      "id": "f4f8be63-6023-4ea8-8f5f-3a8c67f75d42",
      "name": "Answer Denied",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -304,
        112
      ]
    },
    {
      "id": "8a0a7195-0cd0-4f10-8d63-a8f275b6f869",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        336
      ],
      "parameters": {
        "width": 640,
        "height": 528,
        "content": "## Description\n\n📝 Access Control Flow — Quick Guide\n\nTelegram Trigger — receives a message from the user.\n\nUser Access Table — stores the list of users and their access status (granted / denied).\n\nChe"
      }
    },
    {
      "id": "538d0040-d075-4350-b888-8e75a85724bc",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -112
      ],
      "parameters": {
        "width": 640,
        "height": 416,
        "content": "## [Video Tutorial](https://youtu.be/Blm7iamYaoA)\n@[youtube](Blm7iamYaoA)"
      }
    },
    {
      "id": "e6a0b869-8c90-4a91-8301-fc3290c005be",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1120,
        96
      ]
    },
    {
      "id": "aa1bada5-b182-4ddc-855a-9bcdf413f30c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1184,
        304
      ],
      "parameters": {
        "width": 848,
        "height": 576,
        "content": "## Can be used\n\n"
      }
    },
    {
      "id": "0b0798a7-9672-444b-b909-b70b59a4672f",
      "name": "Slack Trigger",
      "type": "n8n-nodes-base.slackTrigger",
      "position": [
        -1136,
        400
      ]
    },
    {
      "id": "947b90c3-75e4-48ea-bfd5-ff7e51d51f5a",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -848,
        336
      ]
    },
    {
      "id": "6b3daa96-e27d-4808-905d-95f68fb1cde6",
      "name": "Get a record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -848,
        496
      ]
    },
    {
      "id": "ad4f0fc1-6dea-4c04-ae52-0036b9b38480",
      "name": "Get a database page",
      "type": "n8n-nodes-base.notion",
      "position": [
        -848,
        672
      ]
    },
    {
      "id": "0fecf591-9ac2-4682-9fb2-dd9c306cc301",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -576,
        416
      ]
    },
    {
      "id": "506988e7-e20e-47a3-9425-06e2acfc02d3",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        -576,
        608
      ]
    },
    {
      "id": "fb2f871f-d2cb-48d3-bb67-2c3dd235006f",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2512,
        -400
      ],
      "parameters": {
        "width": 640,
        "height": 1264,
        "content": "## Instruction\n\n## 1. Connect Telegram Bot\nThis workflow starts with a Telegram Trigger node.\nIn Telegram, open @BotFather\n\nCreate a bot:\n/newbot\nFollow prompts → copy the Bot Token.\n\n## 2. In n8n:\nGo"
      }
    },
    {
      "id": "11357eba-2ed4-4739-b273-84fb2cc6a5f8",
      "name": "Database with employees",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -848,
        96
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        []
      ]
    },
    "Permission": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Answer Denied",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a record": {
      "main": [
        []
      ]
    },
    "Slack Trigger": {
      "main": [
        []
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Database with employees",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        []
      ]
    },
    "Database with employees": {
      "main": [
        [
          {
            "node": "Permission",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    }
  }
}