{
  "name": "Telegram AI chatbot",
  "nodes": [
    {
      "id": "ea71a467-a646-4aca-b72e-cef1249c74e2",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        20,
        340
      ]
    },
    {
      "id": "1cbe43d4-ea8b-4178-bc10-4bfad7abe143",
      "name": "CheckCommand",
      "type": "n8n-nodes-base.switch",
      "position": [
        980,
        360
      ]
    },
    {
      "id": "074e907f-634b-4242-b669-33fa064f8472",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        581.661764705882
      ],
      "parameters": {
        "width": 316.1071428571428,
        "height": 231.22373949579838,
        "content": "## Error fallback for unsupported commands"
      }
    },
    {
      "id": "2aa961b8-f0af-4d5c-a6af-1be56ea4b2e6",
      "name": "Settings",
      "type": "n8n-nodes-base.set",
      "position": [
        380,
        340
      ]
    },
    {
      "id": "2d2fe268-1e3e-483b-847c-4412e586c1ca",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        -240
      ],
      "parameters": {
        "width": 330.5019024637719,
        "height": 233,
        "content": "## Chatbot mode by default\n### (when no command is provided)"
      }
    },
    {
      "id": "09a9c0b4-ac6e-46eb-b2e0-ef2b55e94ada",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        20
      ],
      "parameters": {
        "width": 330.7863484403046,
        "height": 219.892857142857,
        "content": "## Welcome message\n### /start"
      }
    },
    {
      "id": "088cffee-5720-488b-a4ec-cfdccbf77e75",
      "name": "Chat_mode",
      "type": "n8n-nodes-base.openAi",
      "position": [
        1340,
        -160
      ]
    },
    {
      "id": "41248697-6474-4a8f-a8b8-038c96465948",
      "name": "Greeting",
      "type": "n8n-nodes-base.openAi",
      "position": [
        1340,
        80
      ]
    },
    {
      "id": "20c2e7fa-5d65-441b-8d1d-a8d46c624964",
      "name": "Text reply",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1700,
        -40
      ]
    },
    {
      "id": "30321276-ebe1-41ac-b420-9dab8daa405b",
      "name": "Send Typing action",
      "type": "n8n-nodes-base.telegram",
      "position": [
        580,
        480
      ]
    },
    {
      "id": "7d7ff2e8-b0ca-4638-a056-f7b4e2e6273d",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        800,
        360
      ]
    },
    {
      "id": "656bab5e-b7f7-47a1-8e75-4a17d2070290",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        280
      ],
      "parameters": {
        "width": 329.7428571428562,
        "height": 233.8785714285713,
        "content": "## Create an image\n### /image + request"
      }
    },
    {
      "id": "ca2111d2-463a-4ef0-9436-ee09598dbf07",
      "name": "Create an image",
      "type": "n8n-nodes-base.openAi",
      "position": [
        1340,
        360
      ]
    },
    {
      "id": "e91d616b-1d5e-40e8-8468-2d0b2dda4cf7",
      "name": "Send error message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1700,
        660
      ]
    },
    {
      "id": "125e27d2-b03b-4f02-9dd1-8fc81ecf0b6b",
      "name": "Send image",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1700,
        360
      ]
    },
    {
      "id": "730a51ac-223e-4956-be7f-166eadb6ed81",
      "name": "PreProcessing",
      "type": "n8n-nodes-base.set",
      "position": [
        200,
        340
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "CheckCommand",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Greeting": {
      "main": [
        [
          {
            "node": "Text reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Settings": {
      "main": [
        [
          {
            "node": "Send Typing action",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat_mode": {
      "main": [
        [
          {
            "node": "Text reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CheckCommand": {
      "main": [
        [
          {
            "node": "Chat_mode",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Greeting",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create an image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send error message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PreProcessing": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create an image": {
      "main": [
        [
          {
            "node": "Send image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "PreProcessing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Typing action": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}