Standard Telegram bots created via @BotFather have significant limitations on mass messaging: a bot can only message users who have clicked “Start” or messaged the bot first. Sending mass messages manually is limited by a person’s physical capacity: it’s difficult to manage conversations with many customers at the same time. In this article, we’ll explore the different methods for sending mass messages and show how the Telegram API from GREEN-API helps bypass bot limitations.
There are four viable methods: a mass messaging service with a ready-made interface, a scheduling bot within the messenger, custom code using the Telegram Bot API, and custom code using the API from GREEN-API. Below, we’ll walk through each one step by step: how to create a bot, build a subscriber base, and send a message.
Table of Contents
Who You Can Send Broadcasts To on Telegram
Telegram has several scenarios—private messages, your own groups and chats, other people’s chats and channels—and each has its own conditions.
| Where do we send | A bot from @BotFather or a library based on it | GREEN-API chatbot or automation on | Manual manager |
| Personal messages | Only to those who pressed “Start” or wrote to the bot | You can write first | You can write first |
| Your own group or chat | You can write first | You can write first | You can write first |
| Other people’s chats and channels | It is forbidden | The restrictions are the same as for a regular user. | The restrictions are the same as for a regular user. |
Let’s take a closer look at two frequently searched queries: “send a message to all contacts” and “send a message to a purchased contact list.” This isn’t possible with bots from @BotFather: a bot needs a user’s chat ID, and that ID only appears after the user has messaged the bot or clicked “Start.” With GREEN-API, it’s technically possible to message users first, but sending messages to a purchased contact list without the recipients’ consent will almost certainly lead to complaints and your account being blocked. Therefore, only message those who have given their consent—we’ll explain how to build such a list below.
How to Create a Messaging Bot via @BotFather
You can create your own bot in @BotFather—Telegram’s official bot for creating, configuring, and managing bots. After creation, you’ll receive a token that you’ll need to enter into your messaging service or code. Treat the token like a password: it’s confidential; you must not share it with others, let alone publish it publicly.
Let’s walk through the process step by step:
- Open @BotFather in Telegram and send the command
/newbot. It will ask you to come up with a name and username for the bot. - Enter the bot’s name—this is what users will see in the chat list and on the bot’s profile. You can change the name later using the
/setnamecommand. - Enter a username that’s 5 to 32 characters long: Latin letters, numbers, and underscores. It must end with “bot,” for example,
easyshop_bot. You can’t change the username later, so choose it carefully. - Save the token sent by BotFather. This is a long string that the service or your code uses to control the bot.
- Set up your profile: set your avatar with the
/setuserpiccommand, your description with the/setdescriptioncommand, and your “About Me” text with the/setabouttextcommand.
Visual Platforms for Creating Broadcasts and Bots on Telegram
There are no-code platforms where you can build a bot using a visual editor: workflows, broadcasts, and auto-replies are configured with a mouse rather than code. The main advantage of this approach is speed and accessibility: you can launch a working bot in a single evening without hiring a developer, and make changes on your own. The main drawbacks are that pricing is usually significantly higher than working directly via the API, template logic is limited, and migrating to another service becomes difficult as the project grows.
When choosing a platform, start with three key criteria: does the service support mass mailings; can you integrate a CRM, payment systems, and analytics; and how good is the support and is there documentation available? Also consider price, ease of use, and scalability. It’s hard to find the perfect service, so base your decision on your specific needs: a simple builder will suffice for basic messaging, but if you need complex scenarios and integrations, it’s better to go with a more powerful solution right from the start.
Libraries for bots created via @BotFather
There are two popular libraries for Python: pyTelegramBotAPI (telebot) and aiogram. Telebot is suitable for small projects, while for high-traffic bots, it’s better to use the asynchronous aiogram. In both cases, you’ll need a bot token from @BotFather. Do not store it in the code; instead, store it in the BOT_TOKEN environment variable. Below are some basic examples of echo bots.
On telebot. Installation pip install pyTelegramBotAPI
import os
import telebot
bot = telebot.TeleBot(os.environ["BOT_TOKEN"])
@bot.message_handler(commands=["start"])
def start(message):
bot.reply_to(message, "Hello! I am echo-bot from GREEN-API article about Telegram bots.")
@bot.message_handler(func=lambda m: True)
def echo(message):
bot.send_message(message.chat.id, message.text)
bot.infinity_polling()
On aiogram 3.x. Installation: pip install aiogram
import asyncio
import os
from aiogram import Bot, Dispatcher, F
from aiogram.filters import CommandStart
from aiogram.types import Message
bot = Bot(token=os.environ["BOT_TOKEN"])
dp = Dispatcher()
@dp.message(CommandStart())
async def start(message: Message):
await message.answer("Hello! I am echo-bot from GREEN-API article about Telegram bots.")
@dp.message(F.text)
async def echo(message: Message):
await message.answer(message.text)
async def main():
await dp.start_polling(bot)
if __name__ == "__main__":
asyncio.run(main())
To turn a bot like this into a mailing list, you’ll need a database to store subscribers’ chat_ids, a message queue with pauses—no more than 30 messages per second—otherwise Telegram will return a 429 error or block your bot entirely.
Pros: All bot features are available—inline buttons, command menus, inline mode, payments, and mini-apps. The code works directly with Telegram, without an intermediary, so delays are minimal, and data doesn’t pass through a third party. The libraries are free, and there’s a large open community around them.
Cons: The bot cannot message a user first—the user must click “Start” themselves. Users can tell they’re chatting with a bot, not a real person. You’ll need to set up the server, hosting, error handling, and scaling on your own, and you’ll be left to handle user issues on your own: there’s no technical support. The code works only for Telegram; if you want to build an integration for WhatsApp or another messaging app, you’ll have to write everything from scratch.
How to Create a Telegram Chatbot Using the GREEN-API
Create an instance in your GREEN-API dashboard. The free “Developer” plan is a good place to start. Authorize your Telegram account via the QR code in your dashboard and copy two parameters: idInstance—the unique instance number—and apiTokenInstance—the access key for the instance.
A bot built using the GREEN-API library is no more complicated than the examples above, but it can do more: in the example below, it displays a menu, sends a link, geolocation, and a file. Installation: pip install telegram-chatbot-python. Before running it, clear the Webhook URL field in the instance settings, because the bot receives notifications on its own.
import os
from telegram_chatbot_python import GreenAPIBot, Notification
bot = GreenAPIBot(os.environ["ID_INSTANCE"], os.environ["API_TOKEN_INSTANCE"]
)@bot.router.message(command="start")def message_handler(notification: Notification) -> None:sender_data = notification.event["senderData"]sender_name = sender_data["senderName"]
notification.answer(
(
f"Hello, {sender_name}! Here`s what I can do:\n\n""1. Report a problem\n""2. Show offcie address\n""3. Show tariffs\n""4. Call for customer support agent\n""Send the number of required item."
)
)
@bot.router.message(text_message=["1", "Report a problem"])def report_problem_handler(notification: Notification) -> None:
notification.answer("https://github.com/green-api/issues/issues/new",link_preview=False,typing_time=2000,
)
@bot.router.message(text_message=["2", "Show office address"])def show_office_address_handler(notification: Notification) -> None:chat = notification.chat
notification.api.sending.sendLocation(chatId=chat, latitude=55.7522200, longitude=37.6155600
)
@bot.router.message(text_message=["3", "Show tariffs"])def show_available_rates_handler(notification: Notification) -> None:notification.answer_with_file("rates.png") # path to a picture with tariffs
@bot.router.message(text_message=["4", "Call for customer support agent"])def call_support_operator_handler(notification: Notification) -> None:notification.answer("All right. Customer support agent will contact you soon."
)
bot.run_forever()
The connection to Telegram is maintained by the GREEN-API server, so you don’t need to keep your account session active: your script simply receives notifications and responds to them. The bot can initiate messages in private chats and groups, and it isn’t marked as a “bot”—messages are sent from a regular account. GREEN-API engineers are responsible for the service’s uptime, and support is available 24/7. Keep in mind that this is a regular Telegram account: Telegram may restrict it if you send aggressive bulk messages, so be sure to follow the recommendations in the section on limits.
How to Send a Broadcast on Telegram Using the GREEN-API
Text messages are sent using the `sendMessage` method; the text length is up to 4,096 characters. An `idMessage` is returned, which can then be used to track the delivery status. Images and documents are sent using the `sendFileByUrl` and `sendFileByUpload` methods.
To get started, you’ll need three parameters from your account dashboard: `apiUrl`—the API host address, `idInstance`—the instance number, and `apiTokenInstance`—the access token. In the example below, the list of recipients is stored in a text file named recipients.txt: one phone number or @username per line. The script retrieves each recipient’s chatId using the checkAccount method and queues the messages. The interval between sends is set by the delaySendMessagesMilliseconds setting—the GREEN-API automatically maintains the pauses between messages in the queue.
import osimport time
import requests
API_URL = os.environ["API_URL"] # apiUrl from consoleID_INSTANCE = os.environ["ID_INSTANCE"]API_TOKEN = os.environ["API_TOKEN_INSTANCE"]
TEXT = ("Hello! New discounts for the rest of this week...\n\n""Write STOP to unsubscribe"
)
def call(method, body):url = f“{API_URL}/waInstance{ID_INSTANCE}/{method}/{API_TOKEN}"response = requests.post(url, json=body, timeout=30)response.raise_for_status()return response.json()
# Pause between sendings within GREEN-API is 5 secondscall("setSettings", {"delaySendMessagesMilliseconds": 5000}),
# recipients.txt: for a phone number (79876543210) or @username per linewith open("recipients.txt", encoding="utf-8") as f:recipients = [line.strip() for line in f if line.strip()]
for recipient in recipients:if recipient.startswith("@"):body = {"username": recipient}else:body = {"phoneNumber": int(recipient)}
account = call("checkAccount", body)if not account.get("exist"):print(f"{recipient}: account not found, skipping")continue
result = call("sendMessage", {"chatId": account["chatId"], "message": TEXT})print(f"{recipient}: in queue, idMessage={result['idMessage']}")time.sleep(1) # do not exceed the request limits per seconds
You don’t need a separate server for the queue: GREEN-API stores and sends messages, and all methods are described in the documentation. GREEN-API engineers are responsible for the service’s uptime, and support is available 24/7. And here’s a bonus: the same API works with other messaging apps—WhatsApp and MAX.
Which bot or service to choose: four ways to send a newsletter
The search term “newsletter bot” refers to four different solutions: a newsletter builder with a ready-made interface, a scheduling bot within a messaging app, custom code on the Bot API using libraries, and custom code on the GREEN-API. The choice depends on your goals: whether you need segmentation and analytics, whether you need integration with a CRM, and whether you have a developer.
If you don’t have a developer but need an interface and analytics, choose the newsletter builder. If your newsletters are infrequent and go to your channel, a scheduler will suffice. If sending messages needs to become part of your system, write code: on the Bot API—if you have enough bot subscribers; on the GREEN-API—if you need to reach out to customers first, scale your service, have live support, extensive documentation, and a fixed monthly fee.
Let’s compare the options in a table:
| Way | What you need at the start | Time to launch* | When it suits | Restrictions |
| Newsletter builder | Bot token, service account | About three hours | No developer, interface and statistics needed | Subscription fee, foreign interface, service dependence |
| Messenger scheduling bot | Bot token only | About an hour | One-time and rare mailings to your channel | Few settings, almost no segmentation |
| Mine code on Bot API (telebot, aiogram ) | Bot token, server, developer | A few days | CRM integration, trigger and transactional messages | You can’t write first; the server, queue, and limits are on your side. |
| Your code on GREEN-API | GREEN-API account, developer | About an hour | CRM connection, trigger and transactional messages: you need to write first | Instance subscription fee, Telegram limits for a regular account |
*Editorial assessment based on experience with integrations, not data from platforms and services.
How to Build a Subscriber Base for Your Newsletter
A Telegram newsletter subscriber base consists of people who clicked “Start” in your bot or who voluntarily agreed to receive messages. You need to actively invite them. The main methods are:
- A link to the bot on your website and social media. The link looks like
t.me/bot_name: a user clicks on it, enters a chat with the bot, and clicks “Start.” To track where a subscriber came from, add a parameter to the link, for example,t.me/bot_name?start=site—this shows that the person came from the website. - Offline QR code. Place it at the checkout counter, on packaging, on a receipt, or on a business card. It leads to the same link, but with a different parameter, so it’s easy to distinguish subscribers from the store from those on the website.
- Button on the product page. A button next to a product or order provides a clear call to subscribe—the customer decides for themselves whether to receive messages about their purchase, the product, or the service.
- Lead magnet. The user receives something of value—a discount, a checklist, or a trial—in exchange for subscribing: by clicking “Start” in the bot or providing a phone number with consent to receive messages.
From the very beginning, stick to two rules:
- Subscribers must consent to receiving messages: let them know this in advance and specify how often you’ll be messaging them.
- The unsubscribe button or command must work from day one. This will reduce the number of complaints and blocks and help retain your target audience.
Purchased databases and lists of members from other groups won’t yield subscribers: these people didn’t consent to receiving messages. The @BotFather bot won’t be able to message them, and messages sent from a regular account via the GREEN API will result in complaints and, most likely, a block. Don’t waste your time on this—it’s better to use the methods described above.
Telegram Limits and How to Reduce the Risk of Being Blocked
Telegram imposes limits on sending frequency. Bots using the Bot API can send approximately 30 messages per second to different chats and about 20 messages per minute to a single group; if these limits are exceeded, Telegram returns a 429 Too Many Requests error. For regular accounts used by the GREEN-API, the limits are stricter, and exceeding them may result in account restrictions. That’s why sending messages to a large contact list takes time—this is normal.
The following rules will help reduce the risk of restrictions:
- Message only those who have given their consent: by clicking “Start” or by providing their contact information themselves. Recipients’ consent is the foundation of any messaging campaign.
- Provide an option to unsubscribe, such as via a button or a command.
- Adhere to rate limits to avoid a 429 error or being blocked.
- Send messages no more frequently than you promised in your welcome message.
- Divide a large list into segments and send them with pauses in between.
- Remove from the list anyone who has blocked the bot or unsubscribed.
For mailings via GREEN-API, additional guidelines apply: set the interval between messages to a few seconds, start no more than 50 new conversations per day with people who aren’t in your contacts, and distribute large mailings across multiple accounts. For more details, see the GREEN-API article on how to reduce the risk of being blocked.
How long will the broadcast take? With the Bot API limit of about 30 messages per second, a broadcast to 1,000 subscribers will take approximately 35 seconds (though in some cases, the sending time can increase significantly, taking hours); to 2,000 subscribers—about 70 seconds; and to 5,000—about 3 minutes. Via the GREEN-API, the speed is determined by the `delaySendMessagesMilliseconds` interval: with a 5-second pause, 1,000 messages will be sent in about 1 hour and 25 minutes, so it’s best to distribute large mailings across multiple accounts.
Chat Broadcasts: Your Own Groups and Channels via @BotFather
This applies only to your own groups and channels. It’s a practical method for announcements and scheduled posts when your audience is already gathered in a chat or channel. For the bot to post in a group or channel, you need to add it and grant it permissions:
- Allow the bot to join groups using the /
setjoingroupscommand in @BotFather. - Add the bot to your group—either from the bot’s profile or via a link like
t.me/bot_name?startgroup=start, which will prompt you to select a group. - For a channel, open the list of channel administrators and add the bot using its username.
- Grant the bot permission to post messages. In the Bot API, this is called `
can_post_messages` and applies only to channels. Grant other permissions only if they are necessary. - Specify where to post: for a public channel, use its `@username`; for other chats, use the numeric identifier.
- Schedule a post: in the bot scheduler, write your post, select the channel and time, and the bot will publish it at the scheduled time.
What You Can Do for Free on @BotFather, and What You’ll Have to Pay For
The following are available for free:
- Creating a bot on @BotFather
- Obtaining a token and connecting it to a service or code
- All @BotFather commands
- Sending up to 30 messages per second via the Bot API
For more complex scenarios, you’ll need to go beyond @BotFather and pay for:
- A server for the bot to run on
- A service add-on—a builder or messaging platform
- Audience segmentation
- Statistics
- Scenarios and automated funnels
- Integration with multiple messaging apps
Telegram, WhatsApp and MAX: How Messaging Works
The rule “only message those who have consented” applies to all messaging apps, but the addressing methods differ. Therefore, before choosing a method, check how the business communicates with its audience: via a contact database or through bot subscribers. This will determine whether Telegram meets your needs.
Each messaging app has official and unofficial ways to send messages. On Telegram, you can create a bot via @BotFather for free, but bots have many restrictions. On MAX, the official bot is available only to companies and sole proprietors in Russia. On WhatsApp, you’ll need to connect the WhatsApp Business API, which has its own limitations: you need a registered company; for certain types of businesses, this communication model isn’t available; and the pricing structure is complex and not suitable for everyone.
Platforms like GREEN-API provide access to multiple messaging apps at once through a unified architecture. This simplifies the creation and maintenance of integrations, including official ones—such as those with the WhatsApp Business API and the MAX Bot API.
How to Tell If a Telegram Broadcast Was Successful
Telegram doesn’t have built-in statistics for broadcasts, so you’ll need to track the results on your own or through your mailing service. Keep an eye on these metrics:
- How many messages were sent
- How many were undelivered due to the bot being blocked
- How many people clicked the button
- How many people clicked the tagged link
GREEN-API sends webhooks about the status of each message: delivered, read, an error occurred, or the recipient doesn’t have an account.
What to Send in a Broadcast and How Often
Once the broadcast is set up, the question remains: what exactly to write and how often. You can send text, images, files, and buttons in a newsletter. Let’s break down what each format is best suited for:
- Text — one message, one idea, one action for the reader.
- Image — explains the essence of the message: shows a product, a diagram, or a map.
- File — instructions, a catalog, or a document that people will want to save.
- Button — a single, clear call to action below the message, such as “Place an Order.” Inline buttons are available to bots via @BotFather.
Stick to the frequency you promised in your welcome message. If you said you’d post no more than once a week, stick to that—otherwise, people will start unsubscribing.
Frequently Asked Questions
How do I set up a newsletter in a Telegram bot?
First, create a bot via @BotFather and get a token. Then gather subscribers: give them a link to the bot so they can click “Start.” After that, connect the token to a messaging service or your own code, select the recipients, write a message, and start sending. The bot won’t message a user until they’ve clicked “Start.”
You can also quickly create a chatbot using GREEN-API: it runs from a regular account, appears in chat like a real person, and can initiate conversations.
What is a Telegram broadcast via a bot?
It’s sending a single message to many people on behalf of the bot. The recipients are those who clicked “Start” themselves or messaged the bot first. The bot saves each subscriber’s chat ID and sends the message to that list. This is how order notifications, news, and promotions are sent. The main difference from regular messaging is that the conversation is initiated by the system, not a person. Therefore, it’s important to obtain consent to receive messages and provide an option to unsubscribe.
Can you send a voice message or audio file in a broadcast?
Yes. The Telegram Bot API sends voice messages using the `sendVoice` method and audio files using the `sendAudio` method. If you’re using a broadcast service, the ability to send audio depends on the service itself, so be sure to check this before launching. File format requirements are specified in the official Telegram Bot API documentation.
How do I set up a broadcast in Telegram if I don’t have a bot yet?
Create a bot: open @BotFather, send the command /newbot, set a name, and save the token. No programming is required—the token connects to the mass messaging service, and if you’re a developer, you can use it in your Bot API code. Another option is to skip the bot altogether: connect your Telegram account to GREEN-API and send messages via the API.
What’s the fastest way to send a broadcast on Telegram?
The fastest way is through a broadcast service or a scheduling bot: all you need is the bot’s token. Keep in mind that Telegram limits the sending rate: by default, bots can send up to 30 messages per second.
What are the advantages of the Telegram API from GREEN-API?
If you need to be the first to reach out to customers, scale your service, access comprehensive documentation, and pay a fixed monthly fee, then GREEN-API is the right choice for you. It offers ready-to-use SDKs, chatbot examples, a YouTube channel, and much more—including live technical support where you don’t have to wait weeks for a response, unlike with Telegram BotFather’s support.