> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/en/build/choose-channel/connect-telegram.md).

# Connect a Conversation Platform: Telegram

Connect the Telegram chat platform: create a Telegram Bot to get a Bot Token, then add the chat platform in MaiAgent and bind an Agent.

## <mark style="color:blue;">Pre-Connection Checklist</mark> <a href="#pre-integration-checklist" id="pre-integration-checklist"></a>

* An "AI Assistant" has been created on the [MaiAgent platform](https://admin.maiagent.ai/)
* A Telegram account has been registered

## <mark style="color:blue;">Start Connection</mark> <a href="#start-integration" id="start-integration"></a>

### 1. Go to the left menu "Chat Platforms" and click the <mark style="color:blue;">"+ Connect Chat Platform"</mark> button in the upper right corner <a href="#step-go-to-channel-menu" id="step-go-to-channel-menu"></a>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-cfa83521237f42113d84ee922d67815b61bcbcc4%2F%E6%88%AA%E5%9C%96%202025-05-06%20%E4%B8%8B%E5%8D%882.29.25.png?alt=media" alt=""><figcaption></figcaption></figure>

### 2. Select Telegram as the chat platform <a href="#step-select-telegram" id="step-select-telegram"></a>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-bdcede59dc7b50838e69ec050c1a23e4c542f895%2F%E6%88%AA%E5%9C%96%202025-05-06%20%E4%B8%8B%E5%8D%882.32.08.png?alt=media" alt=""><figcaption></figcaption></figure>

### 3. Enter the chat platform name and select an Agent <a href="#step-fill-channel-name-and-ai-agent" id="step-fill-channel-name-and-ai-agent"></a>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-91d5396a37d928491b1e057dfdd698873ff60173%2F%E6%88%AA%E5%9C%96%202025-05-06%20%E4%B8%8B%E5%8D%882.35.01.png?alt=media" alt=""><figcaption></figcaption></figure>

### 4. Obtain the Bot Token from BotFather <https://t.me/BotFather> <a href="#step-get-bot-token-from-botfather" id="step-get-bot-token-from-botfather"></a>

#### a. Click the "BotFather" link: <https://t.me/BotFather> <a href="#sub-step-open-botfather-link" id="sub-step-open-botfather-link"></a>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-744702f30502faa32b469df8900384fffaf9690d%2Fimage%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

#### b. Enter the Telegram BotFather channel <a href="#sub-step-enter-botfather-channel" id="sub-step-enter-botfather-channel"></a>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-7f3c18769c6fcf3002319c8c975c114fbd9adda9%2F%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202025-08-21%20123314.png?alt=media" alt=""><figcaption></figcaption></figure>

#### c. Click "OPEN IN WEB" (if using the web version) <a href="#sub-step-open-in-web" id="sub-step-open-in-web"></a>

#### After clicking, BotFather will ask you to click start to begin the conversation: <a href="#sub-step-start-botfather-conversation" id="sub-step-start-botfather-conversation"></a>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-a92d51a2771b3c7073c6430760a86894dff8dc6e%2F%E6%88%AA%E5%9C%96%202025-05-06%20%E4%B8%8B%E5%8D%882.40.13.png?alt=media" alt=""><figcaption></figcaption></figure>

#### d. Click "<mark style="color:blue;">/newbot</mark>", follow the instructions to enter the Bot name and username, and you will receive the Bot Token <a href="#sub-step-create-new-bot" id="sub-step-create-new-bot"></a>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-15b6f0fe4aa3d0a415c12f9e9125b51417253d6f%2F%E6%88%AA%E5%9C%96%202025-05-06%20%E4%B8%8B%E5%8D%883.22.23.png?alt=media" alt=""><figcaption></figcaption></figure>

### 5. Return to the MaiAgent chat platform connection editing page and paste the Bot Token you just obtained <a href="#step-paste-bot-token-in-maiagent" id="step-paste-bot-token-in-maiagent"></a>

The creation form has three tabs: <mark style="color:blue;">Basic Settings</mark>, <mark style="color:blue;">Feature Settings</mark>, and <mark style="color:blue;">Permission Settings</mark>. Fill in the following under <mark style="color:blue;">Basic Settings</mark>:

| Field                                                                                                 | Description                                                                                                                                                                                                                                                                                       |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">Name</mark>, <mark style="color:blue;">AI Assistant</mark>                  | The platform name and the Agent to connect (step 3)                                                                                                                                                                                                                                               |
| <mark style="color:blue;">Telegram Channel</mark> › Bot Token                                         | Paste the Token obtained from BotFather. The hint below the field reads "After you enter the Bot Token, the system will automatically set up the Webhook for you; no additional configuration is needed." Unlike LINE, you do not need to go back to the platform console and paste a Webhook URL |
| <mark style="color:blue;">Chat Room Settings</mark> › Respond in groups only when @mentioned          | When enabled, the Agent responds only to messages that @mention it in Telegram groups; when disabled, it responds to all messages in the group                                                                                                                                                    |
| <mark style="color:blue;">Enable Typing Indicator</mark>                                              | Shows a "typing" indicator in Telegram while the Agent is preparing a reply                                                                                                                                                                                                                       |
| <mark style="color:blue;">Enable Reset Command</mark>, <mark style="color:blue;">Reset Command</mark> | When enabled, you can add one or more command texts; when a user sends one of these texts, a new conversation is started for that user                                                                                                                                                            |

The <mark style="color:blue;">Feature Settings</mark> (Enable OCR, Use System Time and Time Zone in Answers, Use Sender Name in Answers) and <mark style="color:blue;">Permission Settings</mark> tabs are the same as for other messaging platforms. See [Feature Settings](/maiagent-user-guide/en/build/conversation-settings/platform-settings/function-settings.md#messaging-platform-switches) and [Chat Platform Settings Overview](/maiagent-user-guide/en/build/conversation-settings/platform-settings.md#tab-map).

After pasting the Bot Token, click the "<mark style="color:blue;">Connect Chat Platform</mark>" button in the lower right corner to complete the connection setup

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-dc10a03da58822d2e9ed5b061ec10c3c3de6475a%2F%E6%88%AA%E5%9C%96%202025-05-06%20%E4%B8%8B%E5%8D%883.41.08.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-c54f0b7fc1d670659e126e5b0fa4000f99f62ca1%2F%E6%88%AA%E5%9C%96%202025-05-06%20%E4%B8%8B%E5%8D%882.49.41.png?alt=media" alt=""><figcaption></figcaption></figure>

### 6. **Verify the connection** <a href="#step-verify-integration" id="step-verify-integration"></a>

You can start a conversation with the Telegram Bot you just configured

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-b7bb328d53c255ce72012401dd26ca1edc29d942%2F%E6%88%AA%E5%9C%96%202025-05-06%20%E4%B8%8B%E5%8D%882.55.48.png?alt=media" alt=""><figcaption></figcaption></figure>

If the conversation can be viewed in All Conversations in MaiAgent, the connection is successful!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/en/build/choose-channel/connect-telegram.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
