How to Build a Simple Telegram Bot: An Introductory Guide

Written by quickwork | Published 2021/06/30
Tech Story Tags: telegram | chatbot | nocode | api | ai | bot | telegram-bot | good-company

TLDR This article demonstrates how to create a simple chatbot in Telegram and configuring it using Quickwork Journey Builder. The bot is ready to interact with your customers 24/7 with the help of other actions such as Send document, Send photo, Send video. It can be used to send a Hello to the bot when a user sends a message: "Hello" The bot will respond with the text message specified in the Telegram action: "Get new message," or "Send video" It can help you make a smarter Telegram bot that can seriously help you enhance customer engagement.via the TL;DR App

This article demonstrates how to create a simple chatbot in Telegram and configuring it using Quickwork Journey Builder.
Skill levelEasy
Time required: 5 minutes

What you'll need:

  1. Referring to the Telegram: Connecting your account guide
  2. Telegram account
  3. Telegram - Get new message trigger
  4. 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. 
Also published on: https://helpdesk.quickwork.co/hc/en-us/articles/360051946673-Telegram-How-to-build-a-simple-bot

Written by quickwork | Quickwork is a no-code, API-based, enterprise-grade, SaaS platform with 1,000s of pre-integrated apps.
Published by HackerNoon on 2021/06/30