Growing
How to use a bot to post to a Telegram channel
By the Botable team
A bot posts to a channel by being an admin of it with the post-messages right. Add it as an administrator, get the channel id, and send to that id. Channels are broadcast-only, so a bot cannot have a conversation there.
The short version
Publishing to a Telegram channel from a bot differs from a group in ways that catch people out. A bot cannot be an ordinary channel member — it is either an administrator or absent — and posting requires the post-messages right specifically. Once that is set, sending is the same call as any other chat, addressed to the channel's id, which for channels and supergroups is a negative number beginning with -100 rather than the @username people expect. Channels are broadcast surfaces: there is no conversation to respond to, so a bot there publishes and edits rather than replies. Editing is the underused capability. Because a bot can edit a message it posted, a channel post can be kept current in place — a price, a status, a leaderboard — instead of being superseded by a newer post, which is what turns a channel into something people scroll past.
Step by step
How do you give the bot access?
Open the channel, go to Administrators, add the bot, and enable Post Messages. Add Edit Messages if it will update posts and Delete Messages if it will remove them. Without post-messages the send is refused, and the refusal is silent from the channel's side.
How do you find the channel id?
For a public channel, @username works. For a private one you need the numeric id, which is negative and starts with -100. The reliable way to get it is to have the bot report the chat id of a message forwarded from the channel — see the chat-id guide for the exact method.
How do you schedule posts?
Your bot schedules them, not Telegram — store the post and its send time and have a scheduled job publish it. Store the author's timezone with the time, because a scheduled post is the place where an ambiguous hour is most visible.
When should you edit rather than post again?
Whenever the post is a live value: a price, a countdown, a status, standings. Editing keeps one authoritative message instead of a scroll of stale duplicates, and subscribers are not notified for each update, which is precisely what you want for something that changes hourly.
What catches people out
- Bots cannot be ordinary channel members — administrator or nothing
- Channel ids are negative and start with -100; a positive id is a private chat, not your channel
- Editing does not notify subscribers, which is the point for live values and a problem if you expect a ping
Questions
Can the bot read comments on a channel post?
Comments live in the linked discussion group, not the channel. Add the bot to that group with the appropriate permissions and it can read and moderate them there.
Can it post to several channels at once?
Yes — it can be an admin of many. Space the sends rather than firing them simultaneously, because bulk publishing runs into Telegram's rate limits quickly.
Want a bot that does this?
Describe it in plain language and Botable writes the code, gives the bot its own database, deploys it and keeps it running. Everything on this page is handled for you — the token, the webhook, the storage, the hosting.
Keep reading
- Finding chat and user IDstelegram chat id
- Scheduled messagestelegram bot scheduled messages
- Rate limitstelegram bot rate limits