Why my GitHub bot moved from WhatsApp to Telegram
A bot that pipes GitHub events into a chat I actually read. The WhatsApp version worked; Telegram made it maintainable. Here's the trade, and the architecture underneath.
A bot that pipes GitHub events into a chat I actually read. The WhatsApp version worked; Telegram made it maintainable. Here's the trade, and the architecture underneath.
I miss GitHub notifications constantly. Not because there are too many, because I don't live on GitHub. So I built a bot that pipes GitHub events into a chat, and shipped the first version on WhatsApp with Baileys.
It worked. Then I moved it to Telegram, and the project stopped being a liability.
Note
This one is still in development. The architecture below is what's running; the polish (quiet hours, digest mode, per-repo filters) isn't done yet.
In Nigeria, WhatsApp is the default notification surface. A webhook that lands in a chat I open fifty times a day beats an email I check twice a week. The lesson generalizes: meet yourself on the surface you already watch, not the one you wish you watched.
So the goal was never "a WhatsApp bot". The goal was "GitHub speaks where I already am". That reframing is what made switching clients a weekend job instead of a rewrite.
Baileys is an unofficial implementation of the WhatsApp Web protocol. That's the whole problem in one sentence:
None of those are fatal. All of them are maintenance debt on a tool whose only job is to save me attention.
Telegram's Bot API is official, HTTP-based, and stateless. A bot is a token you POST to. That single change deletes the entire class of problems above:
| WhatsApp (Baileys) | Telegram Bot API | |
|---|---|---|
| Transport | Long-lived socket | Plain HTTPS request |
| Auth | Paired session (QR) | Static bot token |
| Deploy | Always-on process | Anywhere that can fetch |
| Breakage | Protocol can shift | Versioned, documented |
The interesting part isn't that Telegram is nicer. It's that the shape of the integration changed what I could build. A stateless sender means I can run it from a cron, a serverless function, or a webhook handler with no coordination.
Three moving parts, same as before:
Formatters stay deliberately dumb, one function per event, so adding an event is a five-line diff:
type Formatter = (e: GitHubEvent) => string | null;
const FORMATTERS: Record<string, Formatter> = {
pull_request: (e) =>
e.action === "opened"
? `🔀 PR #${e.number} opened, ${e.title}\n${e.url}`
: null,
issues: (e) =>
e.action === "opened" ? `🐛 Issue #${e.number}, ${e.title}\n${e.url}` : null,
release: (e) => `🚀 ${e.release.name} is out\n${e.release.url}`,
};
export async function deliver(event: GitHubEvent) {
const format = FORMATTERS[event.kind];
if (!format) return; // not interesting, say nothing
const text = format(event);
if (!text) return;
await queue.push({ chatId: event.chatId, text });
}The sender is one function, and that's the point:
async function send({ chatId, text }: Job) {
const res = await fetch(
`https://api.telegram.org/bot${process.env.TELEGRAM_TOKEN}/sendMessage`,
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ chat_id: chatId, text, parse_mode: "HTML" }),
},
);
if (!res.ok) throw new Error(`telegram ${res.status}`); // let the queue retry
}Tip
Throw on failure and let the queue own retries. A sender that quietly swallows errors is how notifications go missing for a week before you notice.
The bot is still in development: quiet hours, a daily digest, and per-repo filters are the next three things. The point of moving to an official API was to make those small features instead of structural ones.
The lesson is bigger than bots: when a tool's job is to save you attention, it must not cost you any. If maintaining the integration is harder than living without it, the integration is the bug.
Daniel Oluwadare · Emerald
Software engineer on TestFlow, and the person writing everything here. I build in public and post what I learn.
10 Nov 2026 · 2 min
Building Calder: why I started a developer-first email API
Every project I shipped needed transactional email, and every time I wired up a provider I rebuilt the same three things. Calder is my attempt to build them once, properly.
6 Nov 2026 · 4 min
Building TestFlow: what a real exam backend taught me about users
1,500+ questions, 1,300+ students, and a lecture timetable that does not care about my deploy schedule. The backend decisions that made TestFlow survive contact with real students.
22 Oct 2026 · 1 min
TypeScript patterns I actually use in production
No clever type gymnastics, just the handful of patterns that have saved me from real bugs in real codebases.