{
  "name": "Telegram bot with menu-driven commands",
  "nodes": [
    {
      "id": "b45285b7-5d2e-4f87-b796-b4db51416dcb",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -460,
        200
      ]
    },
    {
      "id": "bcdab8f6-7844-45b9-a4b1-6c7b4e7db34e",
      "name": "Switch (Command Routing)",
      "type": "n8n-nodes-base.switch",
      "position": [
        -40,
        160
      ]
    },
    {
      "id": "f355edc9-07f7-409f-9f03-6d2895b49a53",
      "name": "Temp to Initiate Static Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -460,
        -300
      ]
    },
    {
      "id": "c99b639e-d184-481d-9871-7dd4416836d2",
      "name": "Check State",
      "type": "n8n-nodes-base.switch",
      "position": [
        -20,
        880
      ]
    },
    {
      "id": "a9d01dd0-0927-4c58-9866-1230af22e965",
      "name": "Clear State",
      "type": "n8n-nodes-base.code",
      "position": [
        920,
        760
      ]
    },
    {
      "id": "6389f680-fa93-4e8f-95ff-0e21f11af087",
      "name": "Set waitingForContent1",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        -340
      ]
    },
    {
      "id": "549abb7a-c688-4cc1-91e1-cb34d13b9700",
      "name": "Set waitingForContent2",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        -120
      ]
    },
    {
      "id": "d2f98541-2150-4472-8ae8-f698257a8258",
      "name": "Prepare IF Value",
      "type": "n8n-nodes-base.code",
      "position": [
        -180,
        900
      ]
    },
    {
      "id": "ae7a40ca-55eb-478d-8bde-c23cfdf3d85e",
      "name": "Command Check",
      "type": "n8n-nodes-base.if",
      "position": [
        -240,
        200
      ]
    },
    {
      "id": "aa197f22-5a55-4883-a852-bed4f0919baa",
      "name": "Set waitingForContent3",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        100
      ]
    },
    {
      "id": "7c5803ba-f704-4664-983e-6534742d9c4a",
      "name": "Send Typing action",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -240,
        -60
      ]
    },
    {
      "id": "7c32f9b4-b9ae-48e3-aede-c8c304167c43",
      "name": "Command1 content request",
      "type": "n8n-nodes-base.telegram",
      "position": [
        500,
        -340
      ]
    },
    {
      "id": "b09fdfed-e95c-4e0e-ae34-cbecf552585c",
      "name": "Command2 content request",
      "type": "n8n-nodes-base.telegram",
      "position": [
        500,
        -120
      ]
    },
    {
      "id": "d402d0e1-2afb-4c10-95af-4db1058e6036",
      "name": "Command3 content request",
      "type": "n8n-nodes-base.telegram",
      "position": [
        500,
        100
      ]
    },
    {
      "id": "ffac12bc-ec49-474d-ac4b-6a401433cad3",
      "name": "No Command check",
      "type": "n8n-nodes-base.telegram",
      "position": [
        240,
        1280
      ]
    },
    {
      "id": "81dd8b62-e5fb-487e-86dd-f69a72dd261c",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        400
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "3ec1c4cc-c9e0-4c4e-b56c-e733bc853270",
      "name": "Command1 result",
      "type": "n8n-nodes-base.telegram",
      "position": [
        520,
        500
      ]
    },
    {
      "id": "1b9114f0-e7ee-43fa-ba9d-536429f926e2",
      "name": "Command2 result",
      "type": "n8n-nodes-base.telegram",
      "position": [
        520,
        760
      ]
    },
    {
      "id": "f5c30793-59fc-4070-91cb-5ca20aeb2431",
      "name": "Command3 result",
      "type": "n8n-nodes-base.telegram",
      "position": [
        520,
        1020
      ]
    },
    {
      "id": "c8bab9d3-f159-44a1-868b-d194e4c05c7e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -580
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "2e3ee128-2c7c-4662-bf2e-6ba518743feb",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -440
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "bef8cc55-9f19-47d2-826b-41512c90964e",
      "name": "Command1 processing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        240,
        500
      ]
    },
    {
      "id": "9b766ceb-dfd1-47b5-a9f8-148fbd79d1d2",
      "name": "Command2 processing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        240,
        760
      ]
    },
    {
      "id": "40902676-eb28-46a7-bad4-c11075979c5d",
      "name": "Command3 processing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        240,
        1020
      ]
    },
    {
      "id": "42462e2d-8536-4509-a2aa-851f40ae6c1e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        1480
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Check State": {
      "main": [
        [
          {
            "node": "Command1 processing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Command2 processing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Command3 processing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Command check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Command Check": {
      "main": [
        [
          {
            "node": "Switch (Command Routing)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare IF Value",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Command1 result": {
      "main": [
        [
          {
            "node": "Clear State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Command2 result": {
      "main": [
        [
          {
            "node": "Clear State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Command3 result": {
      "main": [
        [
          {
            "node": "Clear State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare IF Value": {
      "main": [
        [
          {
            "node": "Check State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Command Check",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Typing action",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Command1 processing": {
      "main": [
        [
          {
            "node": "Command1 result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Command2 processing": {
      "main": [
        [
          {
            "node": "Command2 result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Command3 processing": {
      "main": [
        [
          {
            "node": "Command3 result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set waitingForContent1": {
      "main": [
        [
          {
            "node": "Command1 content request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set waitingForContent2": {
      "main": [
        [
          {
            "node": "Command2 content request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set waitingForContent3": {
      "main": [
        [
          {
            "node": "Command3 content request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Command2 content request": {
      "main": [
        []
      ]
    },
    "Switch (Command Routing)": {
      "main": [
        [
          {
            "node": "Set waitingForContent1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set waitingForContent2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set waitingForContent3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}