{
  "name": "Voice & text Telegram assistant with GPT-4.1-mini and conversation memory",
  "nodes": [
    {
      "id": "a3b8de01-dfe2-4973-affa-f602c07a0b65",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -64,
        80
      ]
    },
    {
      "id": "4be5becc-3487-498d-b796-b40a91b9329c",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1392,
        48
      ]
    },
    {
      "id": "67b709b2-68ce-49c1-ad70-d13e67bcecce",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1360,
        352
      ]
    },
    {
      "id": "1815073f-3372-4021-84bf-9c117f01a111",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1024,
        -80
      ]
    },
    {
      "id": "0cfb4cc4-5b87-4b1e-bf09-50e875605640",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1888,
        48
      ]
    },
    {
      "id": "cd8ef26f-5f45-46ec-a152-dc14fcbdf398",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1552,
        352
      ]
    },
    {
      "id": "7d32da5c-90c7-4c7f-942a-cfdb44d471f6",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        256,
        80
      ]
    },
    {
      "id": "951546cb-0d17-44f0-80c8-cedcb64269c3",
      "name": "Get a file",
      "type": "n8n-nodes-base.telegram",
      "position": [
        512,
        320
      ]
    },
    {
      "id": "42f0d043-b796-425e-a4ff-5c3a2136d02c",
      "name": "Transcribe a recording",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        752,
        320
      ]
    },
    {
      "id": "f02a02f5-917a-424e-a24a-ae3b1b40fa09",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        1024,
        320
      ]
    },
    {
      "id": "1103380a-2e93-492f-81ab-0f90851605ae",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        0
      ],
      "parameters": {
        "width": 236,
        "height": 252,
        "content": "💡 It activates this workflow and triggers/initiates the Telegram message!"
      }
    },
    {
      "id": "d34e0902-7667-44c8-a59b-8b97a2830b23",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -48
      ],
      "parameters": {
        "width": 252,
        "height": 300,
        "content": "💡 It split the input from the user. If the user input is text. Then it goes directly to the test field. Else it will be converted into Text Format."
      }
    },
    {
      "id": "f39d3b38-725e-4621-9fa1-c3b9051e7aea",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        288
      ],
      "parameters": {
        "width": 276,
        "height": 244,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n💡 This node helps your agent to fetch the voice note file"
      }
    },
    {
      "id": "01cf3628-2ef2-4307-b46f-0b9412120992",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        288
      ],
      "parameters": {
        "width": 292,
        "height": 276,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n💡 Transcriber helps to convert the voice into words/text format to analyze the word from the user. "
      }
    },
    {
      "id": "8b9899c0-f007-4a2b-b0f8-4ebd7e866e46",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        992,
        -160
      ],
      "parameters": {
        "width": 276,
        "height": 724,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n💡 These nodes get the input text message from Telegram. Then it throws to the AI Agent to give the response back with the help of the OpenAI Chat Model!"
      }
    },
    {
      "id": "5726d2ac-c4cb-4e74-b8db-23ec20f16979",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        -96
      ],
      "parameters": {
        "width": 396,
        "height": 300,
        "content": "💡 Your AI agent can:\n1. **Receive** messages from the Telegram chat\n2. **Respond** with the OpenAI Chat Model and provide helpful answers.\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "99437331-d7d5-4d42-94bd-75105baa5562",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        304
      ],
      "parameters": {
        "width": 436,
        "height": 324,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n💡 This is the **GPT 4.1 mini** chat model. Here we need to connect with our **API key** to utilize this AI model.\n\n💡 And this is a simple memory to help your agent remember the last few"
      }
    },
    {
      "id": "bed59b48-c359-4200-b4a6-eadab0e28c7b",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1776,
        -96
      ],
      "parameters": {
        "width": 316,
        "height": 316,
        "content": "💡 This will send back the response to the user in Telegram. \n\n💡 Here we need to connect with our **Telegram API key** to make a connection."
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a file": {
      "main": [
        [
          {
            "node": "Transcribe a recording",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe a recording": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}