Creating a Telegram chatbot is particularly easy. You only need to get a regular Telegram account, then to interact with @BotFather on Telegram, which is a built-in bot that will help you setup your own bot!
Very important: make sure that you never EVER show the bot's token to anybody! Otherwise anyone will be able to take control of your chatbot instantly.
BotFather lets you customize your bot even more. You can use the following commands:
/setname
to change the bot's name
/setuserpic
to change the bot's profile picture
/setdescription
and /setabouttext
to change the bot's description/about texts
This is also a perfect way to try the Telegram commands feature, which is very powerful!
Once you have received the bot's token, go to your bot's Channels page and click on Telegram to create a new Telegram chatbot.
Once this is done, you will be able to setup a few commands for your own bot. The /start
command is mandatory and can not be removed (but you can change its description), and it will always trigger the chatbot's welcome flow. You can add more commands to your bot, which will show if you start typing /
or click on the corresponding symbol in the Telegram interface:
If you have flows matching the names of the commands, these flows will be triggered automatically. Otherwise, you can set custom rules in the AI Rules section to match the given commands (including the leading /
)
Most components are available on Telegram, however Carousel
components are currently not supported. Typing
components are also displayed as simple Wait
components.
You can send a broadcast to a given user by using _metadata.id
as their user_id
with the broadcast API or the broadcast interface in the corresponding tab in the channel's settings. It requires that the user has already interacted with the chatbot before (you can not simply send a message to a user's @username
).
You can add custom metadata as well!