{
  "name": "Conversational Telegram bot with GPT-5/GPT-4o for text and voice messages",
  "nodes": [
    {
      "id": "a33e3f45-f16e-4107-937e-0ce1d230060f",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -660,
        -180
      ]
    },
    {
      "id": "e17f452c-4f9a-48f8-91a2-526260159676",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        520,
        420
      ]
    },
    {
      "id": "9b33ec46-8772-4bfb-a448-fea5a673bbaa",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        740,
        460
      ]
    },
    {
      "id": "8cdd7ba8-c998-4ea7-b861-8dcaf12febfe",
      "name": "Get Voice",
      "type": "n8n-nodes-base.telegram",
      "position": [
        80,
        0
      ]
    },
    {
      "id": "7fa34d0e-5215-44e5-b1d3-1e8abb5771ae",
      "name": "Text Or Voice",
      "type": "n8n-nodes-base.switch",
      "position": [
        -240,
        -180
      ]
    },
    {
      "id": "b90a586b-5d90-4f76-8e4e-bd44095f9aac",
      "name": "Transcribe The Voice",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        280,
        0
      ]
    },
    {
      "id": "587adf8a-2e69-4078-a603-84f0322207cb",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        720,
        80
      ]
    },
    {
      "id": "2455c7cb-f341-4891-9096-dc62116298c0",
      "name": "Typing Action",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -240,
        -360
      ]
    },
    {
      "id": "8c2b6195-6101-4652-848c-505d13a3c1d2",
      "name": "Send Response To Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1340,
        80
      ]
    },
    {
      "id": "c8fd047d-8575-484e-939a-46064b81d035",
      "name": "Send Context To AI Agent",
      "type": "n8n-nodes-base.set",
      "position": [
        460,
        -200
      ]
    },
    {
      "id": "f7e90526-08a5-4a59-956f-d39e6ff472f0",
      "name": "Send Transcribe Context To AI Agent",
      "type": "n8n-nodes-base.set",
      "position": [
        460,
        0
      ]
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send Response To Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Voice": {
      "main": [
        [
          {
            "node": "Transcribe The Voice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Text Or Voice": {
      "main": [
        [
          {
            "node": "Send Context To AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Voice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Typing Action": {
      "main": [
        []
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Text Or Voice",
            "type": "main",
            "index": 0
          },
          {
            "node": "Typing Action",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe The Voice": {
      "main": [
        [
          {
            "node": "Send Transcribe Context To AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Context To AI Agent": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Transcribe Context To AI Agent": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}