What are Telegram bots for

Telegram bots allow you to automate some responses in groups or to interact with your customers: here's what they are and how to use them

Maybe you don't know, but if you assiduously use Telegram and are subscribed to many channels and public groups, it's very likely that you have already interacted at least once with a bot. As early as mid-2015, in fact, the application released the API for all programmers who want to use this feature and, since then, bots have been steadily spreading in Telegram chats.

But what are Telegram bots and why are more and more group and channel administrators using them? As the company that develops the instant messaging app itself explains, "Bots are third-party applications running within Telegram. Users can interact with bots by sending them messages, commands, and inline requests." In other words, bots are a convenient way to automate some interactions with users by providing predetermined and "pre-filled" responses to their questions and requests. In the case of channels with thousands and thousands of subscribers, who more or less always ask the same questions, bots therefore prove to be an extremely powerful community management tool.

How Telegram bots work

Usersers can interact with a Telegram bot in two distinct ways. The first is by sending it a direct message via chat: each bot, in fact, has its own username and therefore can be addressed by opening a specific chat with it. The second way is to use inline commands. There are a number of commands that can be given to bots by sending a request via the input field, typing "@ + bot name" and immediately following the command. Some classic examples of using bots on Telegram involve sending news automatically to users of a channel or group, or sending a specific piece of content following a specific request from the user (typical case: automated online help systems).

Who (and how) can create a Telegram bot

Everyone can create as many bots as they want on Telegram. And it's not even very difficult to do so. Just open a dedicated account for each bot and ask Telegram for an HTTP API key. The latter is used to command the bot remotely, via an external app.

Creating a Telegram bot with BotFather

Telegram has an official internal app for creating and managing bots: it's called BotFather. So, by opening a chat with @BotFather, you can issue the commands needed to create and manage bots. The first command is "/newbot": after typing it, you will be asked for the name, the username (which must end with the letters "bot") and the API key assigned to the bot. The latter, in case of loss, theft or compromise, can be generated through BotFather with the command "/token".