# Telegram 机器人

> 在 Telegram 中给智能体发消息并收到它们的回复——它们完成时还会提醒你。

Source: https://docs.neurosquad.ai/zh/integrations/telegram

**Telegram 卡片**把你自己的 Telegram 机器人连接到你的智能体。用手机给机器人发消息，消息就会送达通过[箭头](https://docs.neurosquad.ai/zh/canvas/arrows)连接到这张卡片的智能体。它们也可以在同一个聊天中回复你。

它在你的电脑上运行——无需搭建任何服务器。

## 设置

**1. 创建机器人**

在 Telegram 中打开 **@BotFather**（卡片上有对应的按钮），发送 `/newbot` 并起一个名字。BotFather 会回复一个 token。

**2. 粘贴 token**

添加一张 Telegram 卡片，粘贴 token，然后按 **Connect**。

**3. 给机器人发消息，然后按 Allow**

向你的机器人发送 `/start`。卡片会在 “Wants to talk to your agents” 下显示这个聊天——按 **Allow**。

> 只有你 **Allow** 的聊天才能到达你的智能体。其他发现你机器人的人都会被忽略。

## 在 Telegram 中接收通知

**Tell me in Telegram when a connected agent finishes or needs input** 会向每个已允许的聊天发送消息——这样你离开座位后，也知道什么时候该回来。

你还可以直接在卡片里以机器人的身份输入消息，并选择由哪个已连接的智能体接收。
