Skip to content

Telegram

The Telegram trigger connects the agent to a Telegram bot. From there on, any message sent to the bot — in private chat or in a group where the bot is a member — is handled by the agent.

You need a Telegram bot created via BotFather and the token it issues.

How to create it:

  1. In Telegram, open @BotFather.
  2. Send /newbot and answer the prompts (display name and username, which must end in bot).
  3. BotFather returns the token in the format 123456789:ABCDef.... Save it — that is what you will paste into SquadOS.

Also confirm that:

  • the agent is active and the prompt is ready;
  • sensitive tools are protected with guardrails.
  1. Open the agent in the admin panel.
  2. Go to Triggers.
  3. On the Telegram card, click Connect.
  4. Paste the Bot Token into the field.
  5. Click Connect Bot.

SquadOS validates the token, registers the webhook on Telegram and the card flips to Connected, showing the bot’s @username. A button Open @username on Telegram also appears, deep-linking the bot in the app or web.

  1. Open the bot via the link on the card (or search the @username on Telegram).
  2. Send /start.
  3. Send a message — the agent replies in the chat.

In groups, the bot must be added by a group admin. By Telegram defaults, some bots only reply when explicitly mentioned — check the privacy mode in BotFather (/setprivacy) if you want the bot to respond to every message.

The bot connected here can also receive the output of a Schedule for the same agent. In that case, you need to provide the destination Chat ID in the schedule’s configuration.

See the guide How to find a Telegram Chat ID.

On the connected card, click Disconnect. SquadOS removes the webhook from the bot and the channel is inactive immediately. The original BotFather token remains valid — you can reconnect any time.

  • “Failed to connect the bot. Check the token.” — token is incorrect, expired, or already in use by another SquadOS agent. Generate a new one in BotFather.
  • Bot does not reply — confirm you sent /start to the bot. In a group, confirm the bot has been added.
  • Group messages do not arrive — the bot’s privacy mode is filtering non-mention messages. Disable it in BotFather: /mybots → your bot → Bot Settings → Group Privacy → Turn off.