Telegram

Telegram is a fast-growing messaging platform with over 500 million active users (as of 2022). Telegram chatbots are used widely for various use cases, and building an advanced chatbot for Telegram is extremely easy with Activechat.

The most powerful features of Telegram are:

  • Privacy. Messages are heavily encrypted and can self-destruct after specific periods of time.

  • Speed. Telegram delivers messages faster than any other messenger platform.

  • Power. Telegram has no limits in terms of the size of your media and chats.

  • Security. Telegram keeps all messages safe from external attackers.

As of Jan 2022, Telegram does not support galleries. Keep that in mind when designing your conversations.

Another thing to keep in mind: at the moment ActiveChat does not support channels or group chats. The functionality is planned to be added in the future, however, there is no specific ETA for that.

Check the articles below for some specific information on Telegram chatbots.

Connecting your agent to Telegram

To create a new Telegram chatbot to be used with Activechat, you will need to use the @BotFather. It’s a system chatbot within Telegram, built specifically to maintain customers' chatbots.

Getting chatbot token from @BotFather

Follow these simple steps to create a new Telegram chatbot and connect it to Activechat:

1. Find @BotFather user or click the link https://t.me/BotFather

2. Send /newbot command and give your bot a name. Type this name and press Enter.

3. Give your bot some smart @username (no spaces, English symbols, and digits, should end with _bot).

4. Ready! Copy the access token that @BotFather sent you (select it and press Ctrl+C or Cmd-C).

Connecting Telegram chatbot to Activechat

Now you can use that token in Activechat to connect your new shiny Telegram chatbot to any of your existing bots (or maybe create a new one).

1. Choose “Settings – Channels” in the menu on the left and click the gear icon in the Telegram tile.

2. Paste the access token that you got from @BotFather, click “Connect” and you’re done!

How to use bot commands in Telegram

Telegram allows you to use commands to build something similar to Persistent Menus on Facebook Messenger. These menus can be triggered when the user types “/” (slash) in the conversation.

You can use commands to trigger specific skills in your chatbot. Just go back to @BotFather on Telegram and type “/setcommands”. The bot will ask you which of your chatbots to use, and then prompt you to enter the list of commands.

Each command will trigger a chatbot event with the same name in Activechat.

Type your commands (one per line) with simple descriptions. Please keep in mind that all commands should be contained within a single message, so use “Ctrl+Enter” (or “Cmd+Enter on Mac”) to separate lines, and hit “Send” only after you’ve entered all commands.

Now if you go to your new chatbot on Telegram and hit “/”, it will display the list of commands with descriptions, and once you click a command, an event with the same name will be sent to your chatbot.

In this example, the “/about” command will send “about” event (that will trigger “about” skill in Activechat), “/contact” will send “contact” event, etc.

Best practices for using commands

As with Facebook Messenger Persistent Menus, it makes sense to follow some simple guidelines when designing the lists of commands for your Telegram chatbot.

  • Be descriptive. Chatbot commands tell your users what your chatbot can do, and when designed wisely can immensely increase retention.

  • Use commands to provide access to key features of your chatbot, adding event buttons to trigger chatbot skills.

  • Keep the list of commands short (unless you’re building a chatbot for some specific use case, where many commands are a must).

Last updated