Telegram is a messenger. There is an opportunity to create sophisticated chat-bots on that messenger. Let's figure out how you can create the Telegram-bot on Directual!
In Telegram messenger we go to BotFather and type
BotFather gives to us an HPPT API secret token (red one).
Go to Directual app, Integrations section → Telegram bots, Click the button +Add a bot and insert the secret token we've copied.
Go to Database section,
Integrations/Telegram folder (it appears automatically). Here we see 5 data structures:
Incoming Telegram messages (system name
TMessageIn). Stores all messages that users have sent to the bot.
Out coming Telegram messages (system name
TMessageOut). Stores all messages that the bot have sent to users.
Users Telegram (system name
TUser). Stores Users who have sent messages to the bot.
Chats Telegram (system name
TChat). Stores Chat-objects. That is the object which is used by scenario Telegram step as a 'destination'.
Keyboards Telegram (Legacy) (system name
Type something to the bot! Send a picture, a file, or location details. Then check the
Let's have a look at new objects which appeared in
The clue field for text messages is
text — it contains the message. Also there is information referring to images, files and locations.
Create a new scenario, which triggers new objects in
TMessageIn structure. (See scenarios documentation):
Put Telegram step in scenario and configure it as follows (don't forget to publish and run the scenario):
The bot will act this way:
Check out some useful techniques for building Telegram bots on Directual