> 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/ja/build/choose-channel/connect-telegram.md).

# 会話プラットフォームとの連携：Telegram

Telegram 対話プラットフォームを連携します：Telegram Bot を作成して Bot Token を取得し、MaiAgent で対話プラットフォームを追加して Agent を紐付ける手順です。

## <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="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%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. 対話プラットフォームで Telegram を選択します <a href="#step-select-telegram" id="step-select-telegram"></a>

<figure><img src="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%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. 対話プラットフォーム名を入力し、Agent を選択します <a href="#step-fill-channel-name-and-ai-agent" id="step-fill-channel-name-and-ai-agent"></a>

<figure><img src="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%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. 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 href="#sub-step-open-botfather-link" id="sub-step-open-botfather-link"></a>

<figure><img src="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%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. Telegram BotFather のチャンネルに入ります <a href="#sub-step-enter-botfather-channel" id="sub-step-enter-botfather-channel"></a>

<figure><img src="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%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. 「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="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%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. 「<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="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%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. MaiAgent の対話プラットフォーム連携の編集画面に戻り、取得したばかりの Bot Token を貼り付けます <a href="#step-paste-bot-token-in-maiagent" id="step-paste-bot-token-in-maiagent"></a>

作成フォームには <mark style="color:blue;">基本設定</mark>、<mark style="color:blue;">機能設定</mark>、<mark style="color:blue;">権限設定</mark> の 3 つのタブがあります。<mark style="color:blue;">基本設定</mark> では次の項目を入力します：

| 項目                                                                                        | 説明                                                                                                                                                             |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">名前</mark>、<mark style="color:blue;">AI アシスタント</mark>            | プラットフォーム名と連携する Agent（手順 3）                                                                                                                                     |
| <mark style="color:blue;">Telegram チャンネル</mark> › Bot Token                               | BotFather から取得した Token を貼り付けます。欄の下に「Bot Token を入力すると、システムが自動で Webhook を設定するため、追加の設定は不要です」というヒントが表示されます。LINE のようにプラットフォームの管理画面に戻って Webhook の URL を貼り付ける必要はありません |
| <mark style="color:blue;">チャットルーム設定</mark> › グループでは @ でメンションされた場合のみ応答する                   | 有効にすると、Agent は Telegram のグループ内で @ でメンションされたメッセージにのみ応答します。無効にすると、グループ内のすべてのメッセージに応答します                                                                          |
| <mark style="color:blue;">入力中表示を有効にする</mark>                                              | Agent が返信を処理している間、Telegram に「入力中」の表示を出します                                                                                                                      |
| <mark style="color:blue;">リセットコマンドを有効にする</mark>、<mark style="color:blue;">リセットコマンド</mark> | 有効にすると、1 つ以上のコマンド文字列を追加できます。ユーザーがその文字列を送信すると、そのユーザーとの新しい対話が開始されます                                                                                              |

<mark style="color:blue;">機能設定</mark>（OCR を有効にする、システム時刻とタイムゾーンを使って回答する、送信者名を使って回答する）と <mark style="color:blue;">権限設定</mark> の 2 つのタブは、他のメッセージングプラットフォームと同じです。[機能設定](/maiagent-user-guide/ja/build/conversation-settings/platform-settings/function-settings.md#messaging-platform-switches)および[対話プラットフォーム設定の概要](/maiagent-user-guide/ja/build/conversation-settings/platform-settings.md#tab-map)をご覧ください。

Bot Token を貼り付けたら、右下の「<mark style="color:blue;">対話プラットフォームを連携</mark>」ボタンをクリックすると、連携設定が完了します

<figure><img src="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%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://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%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. **連携が成功したか確認します** <a href="#step-verify-integration" id="step-verify-integration"></a>

設定したばかりの Telegram Bot で対話を行うことができます

<figure><img src="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%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>

該当する対話が MaiAgent の「すべての対話」で確認できれば、連携は成功です！


---

# 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/ja/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.
