Most teams use Telegram for exactly one thing: group chat. That is approximately five percent of what the platform can do. Telegram has a mature Bot API, a less-known MTProto client library, inline keyboards that can drive multi-step approval flows, and a Mini App runtime that serves full React UIs inside the chat window. Combined with a process that stays alive on a cheap Fly.io machine, Telegram stops being a messaging app and starts being an operations interface.
This post covers the specific patterns we use in production: bots with persistent memory, inline keyboard approval flows, group automation and signal scraping, and lightweight internal tools built as Telegram Mini Apps. Each pattern is concrete — where something needs code, there is code.
Why Telegram specifically
Slack and Teams are great for orgs with existing SSO. But if your team already lives in Telegram — or if your users do — there is no friction to onboard, no seat license to buy, and the API surface is genuinely excellent. The Bot API is stable, well-documented, and rate-limits are generous. MTProto gives you programmatic access to any conversation your account is part of, including reading history without being added as a bot. That combination is hard to match elsewhere.
The deeper reason is persistence. A Telegram bot running on Fly.io at the smallest instance tier (256 MB RAM) costs roughly two dollars a month and never sleeps. It holds state in memory, fires on webhooks in under 100ms, and can write to SQLite on an attached volume for anything that needs to survive a restart. That is a complete, always-on automation runtime.
Bot API vs MTProto — pick the right tool
The two interfaces are not competing; they solve different problems.
-
Bot API is the right default. You register a bot with BotFather, get a token, and call
sendMessage/answerCallbackQueryover HTTPS. The bot appears in chats with a distinct badge. Use this for anything user-facing. - MTProto (via Telethon, GramJS, or Pyrogram) lets a real user account send messages, read channels it is a member of, and pull message history without a bot token. Use this for monitoring, scraping group signals, or automating actions a human account needs to perform.
A common pattern: one MTProto client watches a set of groups for keywords or new posts, and a Bot API bot delivers the digested signal to an ops channel with inline action buttons.
Inline keyboards as approval flows
This is the highest-value pattern and the one most teams miss. Telegram's InlineKeyboardMarkup lets you attach buttons to any message. Each button carries a callback_data string. When a user taps it, the bot receives a callback_query event you can act on immediately.
A concrete example: an agent detects an anomaly in a data pipeline and sends:
When the engineer taps "Retry from checkpoint," the bot receives the callback, fires the retry job, and edits the original message to show the outcome. The entire approval loop — alert, decision, action, confirmation — happens inside Telegram without leaving the phone. No dashboard to open, no context switch.
The same pattern works for any approval gate: invoice sign-off, deployment confirmation, content moderation, customer escalation. The key architectural point is that the callback data encodes enough context to act without a database roundtrip. Pack the job ID, action, and any parameters directly into the string. Keep it under 64 bytes (Telegram's limit) and you rarely need to look anything up.
Group and conference automation
A bot added to a group receives every message unless configured otherwise. That is a useful surface for lightweight automation: auto-tagging support tickets, routing questions to the right sub-group, summarizing long threads on demand, or firing a webhook when a specific phrase appears.
One pattern that works well for distributed teams: a bot listens for /standup in a group, collects replies for 15 minutes, formats them, and posts a structured summary to a dedicated channel. No standup app, no separate tool, no integration to maintain. It runs entirely in a 120-line TypeScript file.
Group scraping for market signal
Large public Telegram groups — industry channels, trading rooms, community channels around your product category — contain fast signal that RSS and Twitter don't surface. An MTProto client can join those groups and stream messages into a local database. A simple keyword filter, combined with a scoring model, can surface relevant posts in under a second.
A practical implementation: the MTProto client writes raw messages to a SQLite table. A separate process runs on a 30-second tick, scores new rows by keyword weight plus recency, and pushes the top three items to an ops channel via the Bot API. The ops channel has an inline button per item: "Save" writes to a notes store, "Dismiss" deletes the row. Within a week you have labeled data on what actually matters to your team, without any manual tagging session.
One operational note: MTProto clients need to stay authenticated. Phone number verification happens once; after that, the session string persists. Store it in an environment variable on Fly.io, not in your repo.
Telegram Mini Apps as internal dashboards
Telegram Mini Apps are the most underused feature in the ecosystem. A Mini App is a React (or any JS framework) web app hosted anywhere, launched inside Telegram via a button in any bot message. It gets a verified user identity from the Telegram SDK, meaning you know exactly who opened it without building auth. The SDK passes an initData string you verify server-side with an HMAC against your bot token. That is your entire authentication layer.
Concrete use case: a CRM lookup tool for a sales team. The bot posts a lead notification. The notification has a "View profile" button that opens a Mini App. The Mini App hits an internal API with the verified user ID, pulls the lead's full record, and renders a mobile-optimized card — contact history, deal stage, last activity, and a one-tap "Assign to me" action. No separate mobile app, no login screen, no App Store submission. Deploying a Mini App is publishing a static site and adding the URL to a bot's menu button.
This runs in about 0.1ms. Pass it in a middleware before any endpoint the Mini App calls. One function, zero dependencies beyond Node's built-in crypto, verified identity for every request.
Reliable memory on Fly.io
Fly.io machines can restart. Any state held only in process memory is gone on restart. The right pattern for a Telegram ops bot is a single SQLite file on a Fly volume. Volume storage persists across restarts and deploys. SQLite handles hundreds of concurrent writes per second on a single file — more than any Telegram bot will ever generate — and needs zero infrastructure. No connection pool, no external service, no credentials to rotate.
Persistent memory means the bot can accumulate context over time: which alerts were dismissed, which leads were claimed, which standup entries were already summarized. That context makes the bot qualitatively more useful than a stateless one without any architectural complexity.
For bots that drive AI agents, the same volume holds the agent's memory store. The agent recalls prior conversations, prior decisions, and user preferences across sessions. That is what separates a useful AI assistant from one that forgets everything after every restart.
What this looks like end to end
Take a small operations team managing a content moderation queue. The stack they run on Telegram:
- An MTProto client streams flagged content from monitored channels into a SQLite queue.
- A Bot API bot pulls from the queue on a 60-second tick, sends the next item to the moderation group with Approve / Reject / Escalate buttons.
- Tapping a button fires a callback, updates the queue row, calls the downstream action API, and edits the original message to show who acted and when.
- A "Stats" button in the bot menu opens a Mini App showing throughput, backlog size, and per-reviewer metrics — verified identity, no login.
The entire system runs on two Fly.io machines (one for the MTProto client, one for the Bot API service + Mini App backend), costs under ten dollars a month, and handles the team's full queue without any additional tooling. It was built and shipped in under a week. Operational complexity lives in the code, not in the infrastructure.
The part most teams skip
The gap between "we have a Telegram bot" and "Telegram is our ops layer" is almost always memory and approval flow. A bot that forgets everything and can only send messages is barely more useful than a cron job that posts to Slack. Add persistent state and inline keyboards and you have an operations tool that handles real workflows. Add a Mini App and you have an internal product with zero distribution friction.
None of this requires a large team or a long timeline. The primitives are mature, the runtime cost is low, and the surface area your team already uses — Telegram on their phones — is already there.