Adding a Telegram channel

Nádia Dias Updated by Nádia Dias

Adding a Telegram channel

To connect your chatbot with Telegram, follow these steps:

Talk with BotFather: 

BotFather is a chatbot that creates and manages other chatbots for Telegram. To find it, look for @BotFather in your Telegram's search bar.

Create a new chatbot with BotFather:

Once you start the conversation with BotFather, send the message /newbot to create a new chatbot. Then choose a name and a Username (usernames must always end with “_bot”, ex test_bot).

Receive the access token:

All set! You’ve created your new chatbot and received your token! Copy and save it for use on the Weni Platform.

Registering Telegram on the platform:

  1. With the token in hand, you can now integrate Telegram into your project.
  2. Locate the project you want to integrate.
  3. On the sidebar, click on Applications.
  4. Select the Telegram option and add the channel to your project.
  5. Once added, go to the My Apps tab and click on the Telegram icon to add the token you obtained earlier from BotFather, then click Validate.
  1. All set! The generated channel will have the same name as the bot you created.

Enabling Triggers

The Telegram bot displays a "Start" button when you interact with it for the first time:

To ensure that the Start button initiates a new conversation when clicked, you need to configure the corresponding trigger by providing the name of the Telegram channel and the desired flow.

Since this type of trigger only works on the first interaction, to enable interactions in subsequent flows, you need to have at least one more trigger configured, such as one that captures unhandled messages by another flow.

How did we do?

How to Create a Web Channel

How to create a channel with WhatsApp Demo

Contact