---
title: "Telegram chatbot that answers text and voice messages"
kind: "Kit"
category: "Productivity"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/45f78043-0d95-49d8-aa52-324e2fc15d69"
updated: "2026-11-12"
---

# Telegram chatbot that answers text and voice messages

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that answers Telegram messages with an AI agent on OpenAI’s gpt-5.6-terra. A text goes straight to the agent, and a voice note is turned into text first.

Telegram chatbot that answers text and voice messages is an n8n workflow in the Productivity category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow is a Telegram chatbot that understands text and voice notes. A switch looks at each message. Text goes to an AI agent. A voice note is downloaded, sent to OpenAI for transcription and then goes to the same agent. Anything else gets a short refusal. The agent keeps ten messages of memory for each chat, greets the user by first name and replies in Telegram’s HTML format. Thirteen nodes do the work, beside three sticky notes.

### Who it suits

Small businesses and hobbyists who want an assistant in Telegram that people can type to or talk to. Skip it if the bot must answer from your own documents, because this agent has no tools and no knowledge base.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Customer service | Small shops | Answer routine questions typed or spoken in Telegram | A customer sends a voice note asking for opening hours and gets a written reply. |
| Education | Language teachers | Give students a practice partner they can talk to | A student records a sentence and the bot answers in the same language. |
| Personal use | Busy professionals | Dictate a question while walking and read the answer later | A user sends a voice note asking for a meeting agenda and gets one back. |
| Community | Group admins | Run a helper bot for members who dislike typing | A member sends a voice question about the group rules and gets them explained. |

You need some n8n and two accounts: Telegram and OpenAI. Telegram sends each message to your n8n over HTTPS, so n8n needs a public address.

### Where to use it

Any n8n that Telegram can reach over HTTPS and that can reach OpenAI will run it.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps, behind a public HTTPS address
- Telegram: chat with the bot in a private chat
- Another model: change the model in \`OpenAI Chat Model\` to use a different OpenAI chat model

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Two accounts are involved.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own with a public HTTPS address |
| Telegram | A bot made with BotFather, and its token in a Telegram credential |
| OpenAI | An API key in an OpenAI credential, used by the chat model and by the transcription call |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add a Telegram credential with your bot token and select it in `Listen for incoming events`, `Send Typing action`, `Download voice file`, `Send final reply`, `Correct errors` and `Send error message`.
3. Add an OpenAI credential and select it in `OpenAI Chat Model` and `Convert audio to text`.
4. Check the model in `OpenAI Chat Model`. The file uses `gpt-5.6-terra`.
5. Activate the workflow, then send your bot a text and a voice note.

### How to use it

Write to the bot or send it a voice note. The reply comes back in the same chat, and the bot shows a typing sign while the agent works.

What to change for a different result

| To change | Where |
| --- | --- |
| The assistant’s rules and tone | The system message in \`AI Agent\` |
| The model | \`model\` in \`OpenAI Chat Model\` |
| How many messages it remembers | \`contextWindowLength\` in \`Window Buffer Memory\` |
| The closing line of each reply | The text in \`Send final reply\` |
| The text for unsupported messages | The text in \`Send error message\` |

### Example

A user sends a ten second voice note that asks for a short packing list for a weekend in the mountains.

The bot downloads the note, `gpt-transcribe` turns it into text and the agent answers with a packing list. The reply ends with a thank-you line that says it came from a voice message.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. An AI agent is a model that reads a message and decides what to answer. This one has no tools, only a memory of the chat.

**For experts.** The voice step is an HTTP Request node that posts a multipart form to OpenAI’s transcription address, and a small Code node renames Telegram’s file first. The agent node is version 1.1, the conversational type by default.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Determine content type\` | A switch that sends text, voice and everything else down three routes | A message that starts with a slash still counts as text |
| \`Name the voice file\` | Renames Telegram’s voice file to \`voice.ogg\` | OpenAI’s guide lists \`ogg\` but not \`oga\`, the ending Telegram gives voice notes |
| \`Convert audio to text\` | Posts the voice file to OpenAI’s transcription address with \`gpt-transcribe\` | The answer holds the transcript in \`text\` |
| \`Combine content and set properties\` | Puts the typed text or the transcript into one field and records the kind of message | The agent reads the field \`CombinedMessage\` |
| \`Send final reply\` | Sends the answer in Telegram’s HTML mode with a thank-you line | If Telegram rejects the HTML, \`Correct errors\` sends the text with its special characters escaped |

### Good to know

Two things were replaced because OpenAI retired them. Mindket did not run the new transcription step.

- Chat model: the file used \`gpt-4o\`. OpenAI’s deprecations page, read on 12 November 2026, shuts the dated \`gpt-4o\` snapshots down on 14 January 2027, with \`gpt-6-luna\` as the replacement. Mindket’s copy uses \`gpt-5.6-terra\`, which OpenAI’s model page lists with Chat Completions and function calling, so you can add tools later
- Settings: the temperature and frequency penalty were dropped, because the model page lists no temperature setting
- Transcription: the original OpenAI node always sends \`whisper-1\`, which the same page lists for shutdown on 26 February 2027, with \`gpt-transcribe\` as a replacement. Mindket’s copy calls the transcription address with an HTTP Request node
- Voice files: Telegram bots can download files up to 20 MB (Telegram’s Bot API page), and OpenAI’s guide allows files up to 25 MB
- Replies: Telegram rejects a message longer than 4096 characters
- Your data: your messages and voice notes go to OpenAI. The file holds no credential

## README

```markdown
# Telegram chatbot that answers text and voice messages

An n8n workflow that answers Telegram messages with an AI agent on OpenAI's `gpt-5.6-terra`. A text goes straight to the agent, and a voice note is turned into text first.

## What is inside

- `workflow.json`: the workflow as n8n exports it, sixteen nodes. Thirteen do the work and three are sticky notes that label the steps. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

- The chat model was `gpt-4o`. OpenAI's deprecations page, read on 12 November 2026, shuts the dated `gpt-4o` snapshots down on 14 January 2027, with `gpt-6-luna` as the replacement. Mindket's copy uses `gpt-5.6-terra`. OpenAI's model page lists it with Chat Completions and function calling, so you can add tools later.
- The temperature of 0.7 and the frequency penalty of 0.2 were dropped. The model page lists no temperature setting.
- The step that turned voice into text was n8n's OpenAI node, which always sends `whisper-1`. OpenAI's page lists `whisper-1` for shutdown on 26 February 2027, with `gpt-transcribe` or `gpt-live-transcribe` as replacements. Mindket's copy calls OpenAI's transcription address with an HTTP Request node and the model `gpt-transcribe`.
- OpenAI's speech to text guide lists the file formats `ogg` and `webm` among others, but not `oga`, the ending Telegram gives voice notes. A new Code node, `Name the voice file`, renames the file to `voice.ogg` before it goes out.
- Several nodes were linked to credentials in the author's n8n. The links are gone, so select your own.
- Nothing else. The system message, the switch and the closing thank-you line are the file's own.

## Before you start

- An n8n instance with a public HTTPS address, on n8n Cloud or your own server. Telegram sends every message to that address.
- A Telegram bot made with BotFather, and its token.
- An OpenAI API key.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add a Telegram credential with your bot token. Select it in `Listen for incoming events`, `Send Typing action`, `Download voice file`, `Send final reply`, `Correct errors` and `Send error message`.
3. Add an OpenAI credential and select it in `OpenAI Chat Model` and `Convert audio to text`.
4. Check the model in `OpenAI Chat Model`. The file uses `gpt-5.6-terra`.
5. Activate the workflow, then send your bot a text and a voice note.

## How a run goes

1. `Listen for incoming events` starts the run for each message. It also starts `Send Typing action`, so the chat shows a typing sign.
2. `Determine content type` sorts the message. Text goes on, a voice note goes to `Download voice file`, and anything else goes to `Send error message`.
3. A voice note passes through `Name the voice file` and `Convert audio to text`, which posts the file to OpenAI's transcription address.
4. `Combine content and set properties` puts the typed text or the transcript into the field `CombinedMessage`. It also records whether the message was text or voice and whether it was forwarded.
5. `AI Agent` reads `CombinedMessage`. It uses `OpenAI Chat Model` and keeps the last ten messages of the chat in `Window Buffer Memory`.
6. `Send final reply` sends the answer in Telegram's HTML mode, followed by a thank-you line. If Telegram rejects the HTML, `Correct errors` sends the text with its special characters escaped.

## Change the result

- Rules and tone: the system message in `AI Agent`.
- Model: `model` in `OpenAI Chat Model`.
- Memory: `contextWindowLength` in `Window Buffer Memory`.
- Closing line: the text in `Send final reply`.
- Text for unsupported messages: the text in `Send error message`.

## Good to know

- Mindket did not run this workflow. Telegram and OpenAI were not called, and nobody tried the new transcription step with a real voice note. The field names and limits come from OpenAI's and Telegram's docs and from n8n's source, read on 12 November 2026.
- The transcription call posts the multipart fields `file` and `model`, as OpenAI's speech to text guide shows. The answer holds the transcript in `text`.
- Telegram bots can download files up to 20 MB (Telegram's Bot API page). OpenAI's guide allows files up to 25 MB.
- The agent node is version 1.1, which n8n sets to the conversational type by default. Its prompt asks the model for a JSON action.
- A message that starts with a slash still counts as text, because the first rule only checks that the text is not empty.
- Telegram rejects a message longer than 4096 characters.
- Your messages and voice notes go to OpenAI.
- The file holds no credential and no key.
```

## What is in it

3 files, 19 KB, downloaded as a zip.

```text
NOTICE.md  637 B
README.md  5 KB
workflow.json  14 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 11 steps, starting on a Telegram event
- AI: 1 step calls an AI model: AI Agent
- Sign-ins: Signs in to: Telegram and OpenAI
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 7 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/45f78043-0d95-49d8-aa52-324e2fc15d69)
- [Its page on Mindket](https://mindket.com/p/45f78043-0d95-49d8-aa52-324e2fc15d69)
