# 串接對話平台：Telegram

## <mark style="color:blue;">串接前確認</mark> <a href="#pre-integration-checklist" id="pre-integration-checklist"></a>

* 已在 [MaiAgent 平台](https://admin.maiagent.ai/)上建立好一個「AI 助理」
* 已註冊 Telegram 帳號

## <mark style="color:blue;">開始串接</mark> <a href="#start-integration" id="start-integration"></a>

### 1. 進入左側選單 「對話平台」，點選右上方 <mark style="color:blue;">「＋串接對話平台」</mark> 按鈕 <a href="#step-go-to-channel-menu" id="step-go-to-channel-menu"></a>

<figure><img src="/files/s0YsuufEQGWm5Wcy5Mdg" alt=""><figcaption></figcaption></figure>

### 2. 對話平台選擇 Telegram <a href="#step-select-telegram" id="step-select-telegram"></a>

<figure><img src="/files/R2YypqMxnMzHt3k4zJYS" alt=""><figcaption></figcaption></figure>

### 3. 填寫對話平台名稱、選擇 AI 助理 <a href="#step-fill-channel-name-and-ai-agent" id="step-fill-channel-name-and-ai-agent"></a>

<figure><img src="/files/AKuQIWSyDBEg9PSHCmuD" alt=""><figcaption></figcaption></figure>

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

#### a. 點選「BotFather」連結：[https://t.me/BotFather](#a.-dian-xuan-botfather-lian-jie) <a href="#sub-step-open-botfather-link" id="sub-step-open-botfather-link"></a>

<figure><img src="/files/T1sNo3U6mcH1OHr752YU" alt=""><figcaption></figcaption></figure>

#### b. 進入 Telegram BotFather 的頻道 <a href="#sub-step-enter-botfather-channel" id="sub-step-enter-botfather-channel"></a>

<figure><img src="/files/4IEO2AJHIhAhSrx6iwXw" alt=""><figcaption></figcaption></figure>

#### c. 點選「OPEN IN WEB」（如果是網頁版） <a href="#sub-step-open-in-web" id="sub-step-open-in-web"></a>

#### 點選後，BotFather 會要求您點選 start 開始對話： <a href="#sub-step-start-botfather-conversation" id="sub-step-start-botfather-conversation"></a>

<figure><img src="/files/1oS7AEKUUqoCuxfjmgcf" alt=""><figcaption></figcaption></figure>

#### d. 點選 「<mark style="color:blue;">/newbot</mark>」，依指示輸入 Bot 名稱與用戶名稱，即可取得 Bot Token <a href="#sub-step-create-new-bot" id="sub-step-create-new-bot"></a>

<figure><img src="/files/sYPnBbelj5ADcAOSWLER" alt=""><figcaption></figcaption></figure>

### 5. 回到 MaiAgent 串接對話平台編輯介面，貼上剛取得的 Bot Token <a href="#step-paste-bot-token-in-maiagent" id="step-paste-bot-token-in-maiagent"></a>

貼上 Bot Token 後，點選右下角的「<mark style="color:blue;">儲存</mark>」按鈕，即可完成串接設定

<figure><img src="/files/wNWsd8y1MpNyicMFaqid" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/IV1EiUbo5vXdOzNQ3qua" alt=""><figcaption></figcaption></figure>

### 6. **確認串接是否成功** <a href="#step-verify-integration" id="step-verify-integration"></a>

您可以至剛設定的 Telegram Bot 進行對話

<figure><img src="/files/DehCa3RS3Tq2ubNTsaHw" alt=""><figcaption></figcaption></figure>

如果相關對話可在 MaiAgent 的所有對話中查看，就表示已成功串接！

<figure><img src="/files/BlKRUg9jfvtg45309Zlw" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.maiagent.ai/conversations/connect-telegram.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
