How to Add a Telegram Bot to Telegram Group

By Joren Wouters Updated on

In this tutorial, I will explain how you can add a Telegram chatbot to your Telegram group and automatically reply to messages in your group.

I will show you:

  • How the chatbot can only reply when you mention it
  • How the chatbot can respond to all messages in the group

P.S. In my Telegram Chatbots guide, I already explained how you can can create a chatbot (without using any code), so if you haven’t already seen that one, I highly recommend to read it 🙂

Let’s dive in!

Create a Telegram Group

As already mentioned in the beginning, I created my own Telegram chatbot which can reply to simple questions such as “Can I order a pizza”:

telegram-chatbot-example

So the first step we need to do, is create our own Telegram group.

If you are on a desktop, just install Telegram, click on the Pen icon in the top-left corner and select New group:

create-telegram-group

Here, you need to select the members you want to add (probably some friends/colleagues of yours), give a name to the group (for example “Bot Test”) and click on Create:

telegram-settings-group

 

Add Telegram Chatbot to the group

Now we’ve created our Telegram group and we need to add our chatbot.

So, you can just go to your Telegram chatbot (mine is called “Pizza-DF-Bot”) and click on the Top Bar:

telegram-chatbot-top-bar

Then, you need to click on “More” and select Add to Group:

add-telegram-bot-group

And select the Telegram group you want to add the chatbot to:

telegram-select-group

 

Only reply if you mention the Telegram Chatbot

Once you’ve added your Telegram chatbot to your Telegram group, and you mention it, you will probably see that the chatbot doesn’t automatically respond:

telegram-chatbot-no-response

This is because the chatbot is not an admin of the group.

So, you need to click on the top bar of your Telegram group:

telegram-group-top-bar

Click on Edit:

edit-telegram-group

And then choose for Administrators:

administrators-telegram-group

Click on Add admin:

telegram-group-add-admin

Select your chatbot:

telegram-add-bot-admin

And then give it all the rights it needs:

telegram-bot-admin-permissions

When you’ve done this, and you will ask a question and mention the chatbot again, you will see that it is responding now:

telegram-chatbot-group-response

 

Let Telegram Bot respond to all messages in the group

Now, the chatbot is only responding when you mention it.

But what if you want the chatbot to respond to all messages in the group?

Then, we need to have a talk with the BotFather.

In Telegram, you need to search for “BotFather” and start a conversation with him:

telegram-chatbot-botfather

The BotFather immediately gives you a list of commands that you can use to change the settings of your chatbot:

botfather-automatic-response

Now, you need to type “/setprivacy”, which is a command we can use to change the privacy settings in Telegram groups.

Then, you can select which bot you want to change:

botfather-select-chatbot

Then, you will see that the privacy settings are set to Enable (by default), which means the bot only replies to commands and mentions. Now, if you just type in “Disable” or click on the button, you can disable this setting:

disable-setprivacy-settings-telegram-chatbot

And if you go back to your Telegram group and say something (without mentioning the bot), you will see that the chatbot automatically responds:

telegram-chatbot-group-all-messages

 

Now It’s Your Turn

And that’s how you add a Telegram chatbot to your Telegram group.

Now I have a question for you:

Do you already use Telegram Bots in your Groups? And if not, why not?

Let me know by leaving a comment below!

Want to generate leads and get more customers?

Get access to my new course: Lead Generation System.

A proven, step-by-step on generating leads and converting them into actual-paying customers.

The Lead Generation System is now available for only €49 and covered by a 30-Day Money-Back Guarantee.

Generate leads and customers

Comments (35)

  1. Raphael

    Hi,
    Thanks for information it was very helpful. Please help me how I can add bots to telegram chennel.
    Thanks

    1. Joren Wouters

      Hey Raphael! Currently, there is not a way to add a bot to a Telegram channel, other than manually coding it…

      1. Prabhat

        Hi,
        How to add a bot to a public telegram channel by manually coding it?

        1. Joren Wouters

          Hey Prabhat! I personally don’t have any experience with manually coding this, so I honestly do not know. I would just try a Google search and maybe you can find anything!

  2. Sri

    Is there a way to create a bot and send messages from a group which you are not the owner to your own group?

    1. Joren Wouters

      No, that is not possible. The bot needs to be the admin of the group.

  3. Vin

    Hi,
    Is this possible to filter chat messages from a telegram group and only get notifications when a certain word matches in the chat for the group?

    1. Joren Wouters

      Hey Vin! Yes, you can. In the second chapter of my Telegram Chatbots guide, I explain on how you can do this.

  4. Chloe

    HI! I created a bot with Activechat but when I put it in the group he doesn’t respond to messages or words that should trigger him. He does it in private chat though. I’ve done everything you said in the video but that still does not work. Help!!

    1. Joren Wouters

      Hey Chloe! Good question! This probably is because of ActiveChat itself, they do not provide that functionality with their platform. If I were you, I should contact ActiveChat and ask whether you can do this with their platform.

  5. Emmanuel Lubowa

    Hi.
    How can I add like and dislike on my subject as a comment

    1. Joren Wouters

      Hey Emmanuel! What do you mean with a like and dislike? And I think as a comment you mean the message someone sends in a Telegram group?

  6. Paul

    Hi,

    Almost same as Chloe above, no response in group but appears in the bot. Of course I’ve followed the steps. How to debug?

    Thx.

    1. Joren Wouters

      Hey Paul! This is because with ActiveChat you cannot use Telegram chatbots in groups, they don’t provide that functionality with their platform.

      1. Paul

        Confused. Isn’t that tutorial teach us use in telegram group?

        1. Sai

          I’m with you. i follow exactly as in the tutorial but the bot did not respond in the group chat but appears in the bot. is this something to do with setting or functionality? @Joren your tutorial seems to work tho. any insight will be appreciated.

          1. Joren Wouters

            Hey Sai! Did you use ActiveChat to create your chatbot? If that’s the case, you cannot add your Telegram bot to a group, because ActiveChat does not provide that functionality. If you want a chatbot builder that is able to do this, I would recommend using Xenioo.

  7. algreen

    I’ve added @language_translator_bot to a private and made it an admin so that it can reply when I mention it.
    Now I want it to respond to all messages. But when I talk to the BotFather and /setprivacy, he tells me “You don’t have any bots yet. Use the /newbot command to create a new bot first.”
    I don’t want to create a new bot, I just want the existing bot to respond within my group.
    What to do?

    1. Joren Wouters

      When you go to the Botfather and type “/mybots”, what do you get?

  8. Jonathan Kvanvig

    Great post!! Thanks for sharing this with us. Keep up!

    1. Joren Wouters

      Thank you, Jonathan!

  9. Jaromír

    Hi, I’m struggling with some thing. I use telegram bot cooperating with home assistant. HA sends me via telegram bot some notifications. But it can also work opposite way. I can set up HA receiving message from telegram bot (for example “/something”) to trigger some action. The first trouble is that Google Assistant can’t send a message on telegram to telegram bot, because it’s not possible to set telegram number for the telegram bot as common telegram user. So I tried to use IFTTT and created New group and also New channel in telegram and added my bot to those places (set bot as administrator). Well, I can say to Google assistent something and IFTTT succesfully sends set up text to both places – telegram group and telegram chat group as well. But it’s not enought. If I forward message from “New group” (or “New chat”) manualy to the telegram bot than everything works perfekt. So I have to solve resending messages from “New groups” or “New chat” to my bot automatically. But I don’t know how. Can you help me? Thank’s a lot Jarda

    1. Joren Wouters

      Wow, seems like an awesome setup you’ve thought out. Could you tell me which chatbot builder you used to create the integration between Google Assistant and Telegram? And what is IFTTT?

  10. Alex

    Thanks for helping us Sir. I have a problem. How can i share my personal Bot so that everyone can receive bot messagges? I create a group with bot admin permission, but not worked for me.

    Thanks in advance

    1. Joren Wouters

      Hey Alex! What is exactly not working? And with what chatbot builder did you create your Telegram chatbot?

  11. Murali

    Hi, thanks for the awesome article!

    I’m using @BardeenBot from Bardeen. Would I need to disable privacy settings so it can see all messages in group?

    1. Joren Wouters

      Hey Murali! Yes, you should do that!

  12. Emeke

    Am having issues of adding bot as my admin 😔😔 when ever I click the make bot admin their response is “sorry you are not allowed to do this. Please I need help

    1. Joren Wouters

      Hey Emeke! Are you sure that you are the admin of the bot?

  13. Melco

    Hi
    How i can add a bot who can let members send messages after they add 5 people to the group
    Can someone help me

    1. Joren Wouters

      As far as my knowledge goes, this is currently not possible.

  14. Jefté

    How to read a message in a Telegram channel using Telegraf?

    Hello
    I’m in a simple project, my bot checks what was posted on a telegram channel, I need to get the information and pass it on to other users, this tutorial works with groups, but it didn’t work for my channel.
    How to give the bot permission to read channel messages?

    1. Joren Wouters

      Hey Jefté! I currently do not know any chatbot platform that can read messages from a Telegram channel and send it inside a Telegram group. One way you could try is by doing it via Make (formerly known as Integromat).

  15. Neha

    I have created an AI bot with botfather by integrating it with Activechat AI, I have getting the response fine as per the skills I have configured when I join bot 1to1. But as soon as I am adding it to my group as admin, it is not responding on its own, neither responding even while mentioning its username, any suggesting, please?

    1. Joren Wouters

      Hey Neha! Unfortunately, it is not possible to add a Telegram Bot (created with ActiveChat) to a Telegram Group. ActiveChat does not provide this feature.

Leave a Reply