This article demonstrates how to create a simple chatbot in Telegram and configuring it using Quickwork Journey Builder.
What you'll need:
Skill level: Easy
Time required: 5 minutes
- Referring to the Telegram: Connecting your account guide
- Telegram account
- Telegram - Get new message trigger
- Telegram - Send message action
How to create a bot in Telegram
To create a bot in Telegram, first refer to the steps 1 to 6 of the Telegram: Connecting your account guide.
Configuring Telegram trigger
- Switch to Quickwork Journey Builder and under the Trigger section, choose the Telegram app from the drop-down menu in the App field.
- Select the trigger event, Get new message, from the drop-down menu in the Trigger Event field.
- Click the Link an account button to authorize your Telegram account. Refer to the steps 7 to 11 of the Telegram: Connecting your account guide to do so:
Configuring Telegram action
- Under the Steps section, click on Please choose an action.
- Choose the Telegram app from the drop-down menu in the App field.
- Select the action, Send message, from the drop-down menu in the Action field.
- No need to authorize as we had already done for the trigger.
- In the Chat ID input field, drag and drop the ID data pill from the Get new message trigger output data tree.
- In the Message field, type the message you want to send as a reply on Telegram bot when a user sends a message:
- Save the changes in a journey and click the Start Journey button.
Testing the bot:
- Now, go to your Telegram Android/iOS app and search the bot that you have connected with Quickwork Journey Builder. Specify the username of the bot to search.
Note: In my case, the username of the bot is A12BCDbot and the bot name is SampleBot.
- Tap on it and tap the START button. Simply send a Hello to the bot. The bot will respond with the text message specified in the Telegram action:
In this way, your Telegram bot is ready to interact with your customers 24/7. With the help of other actions such as Send document, Send photo, Send video. Blending with the looping conditions, you can make a smarter Telegram bot that can seriously help you enhance customer engagement.