Sapilon becomes publicly available on 15 November 2026: 34 days to go. The core goes open source the same day →

Telegram integration

In short

Send messages and documents as a bot, and receive replies. Connect it on the Integrations page; your app then calls Telegram through Sapilon without ever holding a Telegram credential.

Lets your app send messages and documents as a Telegram bot you create with BotFather, and receive the messages people send to it. Sapilon registers the bot’s webhook for you.

Connecting

On the Integrations page choose Connect on Telegram and fill in:

  • Bot token — In Telegram, message @BotFather → /newbot (or /token for an existing bot).

Sapilon checks the key with the provider before it saves it, and stores it encrypted; it is never shown again.

  • Messages people send to the bot are delivered to your app.

What your app can do

Only these requests are available; anything else is refused.

  • GET /getMe
  • GET /getWebhookInfo
  • POST /sendMessage
  • POST /sendDocument

Events

Your app can react to: message. Sapilon registers the address with the provider for you when you connect, and removes it when you disconnect.

How the agent uses it

Use integrations.request('telegram', …); paths are Bot API methods, the bot token is added for you.

  • GET /getMe — Example: { method: 'GET', path: '/getMe' }.
  • POST /sendMessage — Example: { method: 'POST', path: '/sendMessage', body: { chat_id: 123456, text: 'Hello' } }.
  • POST /sendDocument — Example: { method: 'POST', path: '/sendDocument', body: { chat_id: 123456, document: 'https://…/a.pdf' } }.
  • GET /getWebhookInfo — Example: { method: 'GET', path: '/getWebhookInfo' }.

Bots can only message people who started a chat with them. Incoming messages: integrations.on('telegram', 'message', handler).

More from Telegram: https://core.telegram.org/bots/api

Last updated .

Was this page helpful?