How to build a Telegram news bot with topic subscriptions

By the Botable team

A Telegram news bot pulls headlines from a feed or news API and delivers them by topic, on demand or on a schedule. Describe your topics and delivery time to Botable and it builds the subscription table, the fetcher, and the digest.

What is a news bot?

A Telegram news bot is a feed reader with a subscription model. It fetches from RSS feeds or a news API, groups items by topic, and delivers them either when asked or on a schedule. The design work is almost entirely about restraint. An unfiltered feed pushed in real time is indistinguishable from spam, so a good news bot batches: one digest per day or per half-day, capped at a headline count the reader will actually finish. Deduplication matters more than it sounds, because the same story arrives from four sources with four headlines; matching on canonical URL and title similarity removes most of it. Subscriptions need one row per user per topic, and the digest job reads those rows to decide who gets what. On Botable both the subscription table and the schedule are set up as part of the build.

What commands does it have?

Commands a news bot typically has, and what each one does
CommandWhat it does
/newsLatest headlines across the user's topics
/topicsLists topics and shows which are subscribed
/subscribe techAdds a topic to the user's digest
/digest 09:00Sets the daily delivery time
/mute 24hPauses delivery without unsubscribing

What do you need before you start?

  • A Telegram bot token from @BotFather
  • Sources: RSS feed URLs, or a news API you want used
  • A topic list — four to six is plenty to start

How do you build it?

How often should a news bot send messages?

Once or twice a day, batched. Real-time push works for a single narrow topic and nothing else. Say the cadence and the maximum number of headlines per message when you describe the bot, or you will end up muting your own creation.

How do topic subscriptions work?

Each subscription is a row linking a user to a topic, so the digest job can select recipients per topic. Ask for a /topics command that shows current state with a tick next to what is on — a subscription list nobody can inspect gets abandoned.

How do you stop the same story arriving four times?

Deduplicate before sending. Match on the canonical link first, then on near-identical titles, and keep a short history of what was already sent to each user. Ask for this explicitly; it is not automatic.

Can the bot summarise instead of just linking?

Yes — a two-line summary per headline reads far better than a bare link, and it is what makes the digest useful without a tap. Describe the summary length you want so the message stays inside a comfortable scroll.

A prompt you can use as-is

Paste this into Botable and adjust the details. It is specific on purpose — a vague description produces a vague bot.

Build a news bot. Topics: Technology, Business, World, Science. /subscribe and /unsubscribe manage a user's topics, /topics shows which are on. /news returns the 5 latest headlines for the user's topics right now, each with a two-line summary and a link. /digest <time> schedules one daily digest at that hour, capped at 8 headlines. Deduplicate stories by canonical URL and near-identical titles before sending.

Build this bot

Who is this bot for?

  • Niche communities that want their industry's news in one place
  • Teams tracking a competitor, a market, or a keyword
  • Anyone who wants a morning briefing instead of an infinite feed

What goes wrong with this kind of bot?

  • Unbatched real-time push is the fastest way to get a bot muted
  • Republish rights vary by source — link and summarise rather than reproducing full articles
  • Feeds go stale silently; ask for a fallback message when a source returns nothing

Questions about news bots

Can it follow a single keyword instead of a topic?

Yes. Keyword tracking is the same subscription mechanism with a text match instead of a category, and it suits brand or competitor monitoring better than broad topics.

Can it post to a channel rather than to individuals?

Yes. Point the digest at a channel the bot administrates and it publishes there. That works well for a public feed; keep per-user subscriptions for private chats.

All twelve build guides