Integrate to Telegram
You can integrate your application to Telegram by creating a Telegram bot to receive and send messages in your Telegram channels. After finishing this guide, you will have a Telegram bot that will answer to messages with the responses generated by your application.
Prerequisites
- A valid Telegram account
- Access to manage applications under your TaskingAI workspace
Step 1: Create a Telegram Bot
First you need to create a Telegram bot that will be configured to connect with your TaskingAI application. To create a Telegram bot, follow these steps:
- Open your Telegram app and search for the
BotFather
user, and start conversation. - Type
/newbot
to create a new bot. - Follow the instructions to set up your bot, including choosing a name and username for your bot. (username will be your bot's unique identifier, and cannot be changed later)
- After successfully creating the bot, you will receive a message with the bot's token. Keep this token safe as you will need it later.
Step 2: Register the bot on TaskingAI
After the previous steps, you are ready to configure your Telegram integration on TaskingAI platform.
- Log in to TaskingAI console, and navigate to the
Applications
tab underWorkspace
. - Click on the application you want to integrate with Telegram.
- On the tab selection bar on the top, click on the
Channels
tab. - Select
Telegram
and provide the necessary information, includingTelegram Bot Token
andTelegram Bot Username
which you obtained from Step 1.
The Telegram Bot Username
must start with '@' symbol. You can find it in your bot's information page
- Click
Activate
after filling the necessary information.
After this step, you should be able to send messages to your Telegram bot and receive responses from your TaskingAI application.
Step 3: Add bot to a Telegram group (Optional)
After the previous steps, you are ready to send direct messages to your Telegram bot and receive response from your TaskingAI application. If you want to add the bot to a group, follow these steps:
- Open your Telegram bot's information page.
- Click the
Add to Group or Channel
button, and select a target group. - Grant the bot Admin rights so that the bot can read messages from the group and respond to them.
Step 4:
Now you can send messages to your Telegram bot and receive responses from your TaskingAI application.