Telegram how to add bot
Connect a Bot Framework bot to Telegram - Bot Service
Feedback
Twitter LinkedIn Facebook Email
- Article
- 2 minutes to read
APPLIES TO: SDK v4
You can configure your bot to communicate with people using the Telegram messaging app. This article describes how create a Telegram bot and connect it to your bot in the Azure portal.
Tip
For information about which features are supported on each channel, see the channels reference article.
Prerequisites
- An Azure account. If you don't already have one, create a free account before you begin.
- An existing bot published to Azure.
- A device with Telegram installed and a Telegram account.
Create a new Telegram bot with BotFather
Create a Telegram bot with BotFather before connecting your bot to Telegram.
Start a new conversation with the BotFather.
Send
/newbot
to create a new Telegram bot.When asked, enter a name for the bot.
Give the Telegram bot a unique username. Note that the bot name must end with the word "bot" (case-insensitive).
Copy and save the Telegram bot's access token for later steps.
Configure Telegram in the Azure portal
Now that you have an access token, you can configure your bot in the Azure portal to communicate with Telegram.
- Log in to the Azure portal.
- Go to your bot. Then select Channels from Settings.
- Select Telegram from the list of Available Channels.
- Enter the token you copied previously into the Access Token field and select Apply.
Your bot's now successfully configured to communicate with users in Telegram.
For information about using Telegram-specific actions in messages, see how to Implement channel-specific functionality.
Feedback
Submit and view feedback for
This page
View all page feedback
How to Add a Bot in Telegram
A feature that makes popular instant messaging app Telegram stand out is the option to use bots in group chats. Their purpose is to essentially enhance the Telegram experience through convenience and entertainment. If you’re an admin for a Supergroup and want to know how to add a bot, we’ve covered the steps on how-to in this article.
We’ll be adding bots to chat groups via different operating systems, learning more about their usefulness and how they differ from human members in chats. Plus, our FAQs include how to create your own unique bot.
How to Add Bots on Telegram?
A Telegram bot is a third-party application used to improve its functionality by performing specific functions, follow instructions, and interact with other members. The following sections are the steps for adding a bot to a Supergroup.
Add a Bot to a Supergroup Chat Using an iPhone
- Launch the Telegram app.
- At the bottom of the screen, click on the Contacts icon.
- At the top of the screen, click on the search bar.
- Type in the name of the bot you wish to add @[botname].
- Click on the bot name to display it in the chat.
- From the top-right hand corner of the chat window, select the bot’s profile image.
- Locate and select the “Add to Group” option below the “Send Message” option to access a list of groups to add members to.
- Select the group you wish to add the bot to.
- Click on “Yes” to confirm.
Add a Bot to a Supergroup Chat Using an Android
- Launch the Telegram app.
- At the bottom of the screen, click on the Contacts icon.
- At the top of the screen, click on the search bar.
- Type in the name of the bot you wish to add @[botname].
- Click on the bot name to display it in the chat.
- From the top-right hand corner of the chat window, select the bot’s profile image.
- Locate and select the “Add to Group” option below the “Send Message” option to access a list of groups to add members to.
- Select the group you wish to add the bot to.
- Click on “Yes” to confirm.
Add a Bot to a Supergroup Chat Using Mac
- Navigate to the “Applications” folder to locate and launch the Telegram app.
- In the search text field at the top left-hand corner of the screen, enter the name of the bot you wish to add.
- Hit the return key for a list of bot search results matching your query.
- Click on the bot you wish to add to the group, the bot will open and display on the right.
- To bring up the bot’s profile, select the bot’s name from the top of the window.
- Towards the top-right hand corner of the window, select the “Add to Group” option.
- Select which Supergroup you want to add to the bot.
- Click “OK” to confirm.
Add a Bot to a Supergroup Chat Using Windows 10
- Navigate to the Windows menu to locate and launch the Telegram app.
- In the search text field at the top left-hand corner of the screen, enter the name of the bot you wish to add.
- Hit the return key for a list of bot search results matching your query.
- Click on the bot you wish to add to the group, the bot will open and display on the right.
- To bring up the bot’s profile, select the bot’s name from the top of the window.
- Towards the top-right hand corner of the window, select the “Add to Group” option.
- Select which Supergroup you want to add the bot to.
- Click “OK” to confirm.
Bot Perks
Using bots in Telegram can be practical:
- Bots can be used as virtual assistants to provide weather forecasts, alerts, translation, and other admin services.
- Bots can deliver relevant content by providing customized news and notifications as soon as it’s available.
- Accept payments for goods and services. The bot payment API is a free platform where sellers can receive payment from Telegram users.
- Bots can help create social connections by connecting people wanting to conversate based on mutual interests or proximity.
- Bots can integrate with other services such as YouTube and Music bots for extra entertainment.
- Bots provide multi and single-player games, from simple puzzles to real-time strategy games.
How Are Bots Different Than Humans?
The following are differences between human members and bots in Telegram:
- For bots running in privacy mode, once added to a group they will not receive messages previously sent to the group.
- They have limited cloud storage therefore older processed messages are promptly removed by the server.
- Bots are not able to start conversations with people. They must be added to a group or a user must send them a message first.
- Their username will always end in “bot.”
- Their label displays as “bot” with no last seen time or online status information available.
BotFather
“BotFather is the one bot to rule them all.”
BotFather is the bot used to create new bots and manage existing ones via Telegram. To contact the BotFather, you can either search for him under username @Botfather or navigate to https://telegram.me/botfather to start a conversation. BotFather will introduce himself and a “Start” button will be available for you to talk back.
Additional FAQs
How to Remove Bots on Telegram?
To remove a Telegram bot from your conversation list via Android:
Note: Removing a bot will also remove the conversation.
1. Launch the Telegram app.
2. Press down and hold on to the bot’s name to display a menu at the bottom of the screen.
3. Select “Delete and stop.”
4. Click on “OK” to confirm.
1. Launch the Telegram app.
2. Locate the bot you wish to remove and swipe left on the conversation.
3. Click on the “Delete” icon from the set of icons that slide out from the right.
4. Select “Delete and Stop” from the option displayed at the bottom of the screen.
How to Add a Bot to a Telegram Group?
To add a bot to a chat group using an Android or iPhone device:
1. Launch the Telegram app.
2. At the bottom of the screen, click on the Contacts icon.
3. At the top of the screen, click on the search bar.
4. Type in the name of the bot you wish to add @[botname].
5. Click on the bot name to display it in the chat.
6. From the top-right hand corner of the chat window, select the bot’s profile image.
7. Locate and select the “Add to Group” option below the “Send Message” option to access a list of groups to add members to.
8. Select the group you wish to add the bot to.
9. Click on “Yes” to confirm.
To add a bot to a chat group using a Mac or PC:
1. Navigate to the Applications folder (Mac) or Windows menu (PC) to locate and launch the Telegram app.
2. In the search field, at the top left-hand corner of the screen, enter the name of the bot you wish to add.
3. Hit the return key for a list of bot search results matching your query.
4. Click on the bot you wish to add to the group, the bot will open and display on the right.
5. To bring up the bot’s profile, select the bot’s name from the top of the window.
6. Towards the top-right hand corner of the window, select the “Add to Group” option.
7. Select which Supergroup you want to add the bot to.
8. Click “OK” to confirm.
How to Create a New Telegram Bot?
1. First, start up a conversation with BotFather either by searching for him under the username @Botfather or by navigating to https://telegram.me/botfather.
2. Then enter and send the command “/newbot.
”
3. BotFather will ask for a name and username. Provide a friendly name and unique username.
· BotFather will generate an authorization token.
4. Copy the token to your clipboard and navigate to your bot’s “Channels” section via the Azure portal then click on “Telegram.”
5. Paste the authorization token into the “Access Token” field then “Save. ”
· Your bot is now created successfully; single, and ready to mingle with other Telegram members.
· Enable “Inline queries” so users can call your bot by entering its username and the query into any chat.
· Check out the Bot API manual to find out what you can teach your bot to do.
Telegram’s Little Virtual Assistants
AI-inspired bots in Telegram are used to enhance the messaging experience by essentially performing admin tasks, connecting people, and providing entertainment. Bots in messaging apps have become increasingly common and the option to use them is available via several popular apps.
Now that you know how to add a bot to a chat, create a bot, and other bot information; do you think the bot did a great job at enhancing your experience? How did the bot serve the group – and did it work as expected? Let us know what you think generally about the use of bots in messaging apps in the comments section below.
Adding a bot to a Telegram chat - to a group, channel or for private messages with a chat bot in Telegram
Publication date: 8/29/2022
5 minutes
to read
Products from this article: 9002 Chatbots are used by many businesses: they help automate routine work. At the same time, they do their job quite well. SaluteBot, for example, can not only give the user ready-made items to choose from in order to continue the dialogue, but also analyze the written text to find the right answer from the database.
In this article, we will tell you how to add a robot to a Telegram chat and how to set up its work according to a certain scenario.
How to add to Telegram
The Telegram bot is responsible for creating bots in Telegram! If you want to create a new robot, go through the following steps:
- Search for the BotFather profile or follow the link https://telegram.me/BotFather.
- Press the "Start" button in the chat.
- Enter the /newbot command.
- Specify a name - this is how users will see it in their contact list.
- Specify the system name: this is the login after the @ sign.
The system name must be unique, and the name can be repeated with existing ones.
When the bot is created, you will see the token. It is needed for integration with scripts. If you forgot to save the token, just write the /token command in the dialog with BotFather.
The basis for the chatbot has been created, and you can even write a message to it. But for it to work, you need to create a script for it. This can be done through the SaluteBot service.
SaluteBot setup and features
To create your own script and link it to the chatbot, register with Studio and log in to your account. We will be using the SaluteBot tool, which helps to create a scenario in map mode. Programming skills are not needed if there is no integration with third-party systems.
After that, register in the Jivo service, which will connect the robot with the scenario. To work, you need a professional account, the first 14 days you can use it for free.
Next, the procedure will be as follows:
- Go to Studio and click "Create Project".
- Select Applications - SaluteBot.
- Click Add Account and log in to Jivo.
- Give the project a name.
- Select "Custom Script", it's free to create a script in design mode.
- Next, you will be taken to the constructor, where you can assemble the desired script.
Here are the possibilities in the constructor:
- Send text to the user (greeting, response to message or action).
- Data request - if you need to clarify some information with the client, for example, name, phone number, order number.
- Condition — the script must respond flexibly to the client's actions, so when you select one or another menu item, the bot will react differently depending on the configured condition.
- Translation of the dialogue to the operator. If the bot does not cope with the question, it will automatically invite the operator to the chat.
- Script call - for advanced scenarios, where data exchange with third-party systems is implied.
How to add to a group
The most common scenario for chatbots in a group is onboarding for new members and moderating messages for prohibited topics with warnings.
To use a telegram bot in a group, just select it as a new member: the robot we created is a regular separate account in the list of group members.
Here's what to do:
- Go to your Telegram group settings.
- Click the "Add Members" button.
- Find the bot by system name using @name.
- Click on it and then "OK" to add it to the telegram chat.
After the robot is added to the group, it will start working out the script that was put into it in the constructor.
In this way, you can use not only a self-created bot, but also any existing one.
How to add to a channel
In a channel, chatbots are used for delayed posts or as a channel guide. In order for the robot to create posts or otherwise act on behalf of the channel, you need to make it an administrator. Here's how to do it:
- Go to the Telegram channel, click on the three dots and select "Channel Management".
- Go to the "Administrators" section.
- In the search, find the bot by its system name using @name.
- Add him as an administrator and specify what permissions he should have. If you do not issue the required permission, then some functions may not work.
You can add your own bot to the channel or select an existing one.
For private chats
If you don't have a group or channel and don't need them for your tasks, you can use the bot in private messaging mode. This is possible immediately after it is created, you just need to write a message to it directly.
This type of use is perhaps the most demanded by businesses, because in private messaging mode the client can transfer his data, and if the dialogue is deadlocked, an operator will connect at any time.
Also, working with a bot directly allows you to test it before using it in a group or channel - this way you can check that all functions work as expected.
Products from this article:
How to connect Telegram chatbot | SendPulse
Chatbot is an automated multifunctional assistant that can show information to subscribers and collect information on demand according to pre-prepared scenarios.
Follow the step-by-step instructions to create your first Telegram messenger chatbot or connect an existing one to the SendPulse service for further customization.
If you already have a bot, skip the first step and go straight to the second.
How to create a new bot in Telegram
Open the Telegram messenger, log in to your account or create a new one.
Step 1. Enter 9 in the search box0009 @BotFather and select a bot.
The official Telegram bot will have a blue confirmation sign next to the name in the form of a checkmark.
Step 2. Click Run to activate the BotFather bot.
In response, you will receive a list of commands for managing bots.
Step 3. Select or type and send the command /newbot
.
Step 4. Give the bot a name - clients will see this name when communicating with the bot. And the nickname of the bot - you can use it to find the bot in Telegram. The nickname must be unique, not repeat the existing ones in the database, and end with the word "bot".
After you select a suitable name, the bot will be created. You will receive a message with a link to the bot t.me/
, recommendations for setting up an avatar, a description of the bot, and a list of commands for setting up the bot.
You will need a token to connect the bot to SendPulse. Copy the value of the token and go to the last point.
Where to find the key for an existing bot
Step 1. Go to the @BotFather bot and enter the command /token
.
You will see buttons with created bots.
Step 2. Select the bot you want to connect.
Copy the value of the token.
How to connect a bot to Sendpulse
Go to the Chatbots section of your SendPulse account. If you did not have connected channels before, click on the "Connect Channels" button.
If you have already connected bots, go to the "Manage Bots" section and click "Add Bot". You can also select "Connect" next to the desired channel.
In the "Telegram" section, enter the access key - the token received in the created bot. Click Connect.
Click the "Subscribe to bot" button. This way you can test every message and thread and send them to yourself before implementation.
You will be redirected to the "Telegram" application, click on the "Start" button and you will subscribe to your bot.
After successfully connecting the chatbot, you will receive a welcome chain, the bot will appear in your list of bots, and you can start creating welcome and trigger chains, mass mailings.