Telegram

Add your bot to Telegram using the official integration.

The official Telegram integration allows users to chat with your bot by messaging a Telegram bot.

Setup

Install the integration in Botpress

First, install the integration to your bot:

  1. In Botpress Studio, select Explore Hub in the upper-right corner.
  2. Search for the Telegram integration.
  3. Select Install Integration.

In the Configuration menu, you should see one field:

  • Bot Token

Leave it empty for now—you’ll come back to it after completing the setup in Telegram.

Create a bot in Telegram

To add your bot, you need to create a corresponding bot in Telegram. You can do this using Telegram’s BotFather:

  1. Log in to Telegram.
  2. Start a conversation with BotFather and follow the prompts to create your bot.
  3. Copy your bot’s access token.

Configure the integration in Botpress

Now, you can finish setting up the integration in Botpress:

  1. In the integration’s Bot Token field, paste your Telegram bot’s access token.
  2. Select Save Configuration.

Cards

startTypingIndicator

inputobject

stopTypingIndicator

inputobject

Triggers

Tags

You can read event tags to get information about an active Telegram conversation:

Telegram conversation ID

To get the Telegram conversation ID:

{
  {
    event.tags.conversation['telegram:id']
  }
}

Telegram user ID

To get the Telegram user ID:

{
  {
    event.tags.user['telegram:id']
  }
}

Telegram message ID

To get the Telegram message ID:

{
  {
    event.tags.message['telegram:id']
  }
}