Skip to main content
Open in Hubv1.0.1 The official Telegram integration allows users to chat with your bot by messaging a Telegram bot.

Setup

You will need:
Visual learner? Check out our Telegram guide on YouTube.
1

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.
2

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.
3

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.
Your Telegram integration is ready—users can now chat with your Botpress bot by messaging your Telegram bot. You can use the integration’s Cards to manage the bot’s typing indicators.

Cards

Here’s a reference for all Cards available with the integration:

Start Typing Indicator

Input: Output: This Card has no output.

Stop Typing Indicator

Input: Output: This Card has no output.

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"] }}
I