Telegram
Telegram sends messages to Telegram groups or channels straight from your
Craft install. Instead of one global "send an alert" switch, delivery is
organized into channels — for example an ecommerce channel for order
and payment notifications, a developer channel for errors and failed jobs,
and an operations channel for imports and background tasks — each with its
own bot/chat target and its own set of subscribed events.
Why teams use it
- Operational visibility without email. Store events land in a group chat the team already has open, instead of an inbox nobody checks in real time.
- No code changes for message wording. Every automated message has a default template, but an admin can override the wording per channel from the CP — the underlying PHP code stays untouched.
- One integration point for other plugins. Any other plugin in the ecosystem (a shop, a booking system, a custom module) can register its own event types and dispatch them through Telegram without knowing anything about bots or chat IDs.
Admin use cases
- Route order confirmations, payment failures, or low-stock warnings to a channel the sales/ops team watches.
- Route unhandled exceptions, failed queue jobs, and failed outbound email
to a
developerchannel so problems surface immediately instead of during the next log review. - Get notified in Telegram whenever an entry, asset, category, or user is created, updated, or deleted in a specific part of the site — useful for content workflows where an editor needs a nudge when a colleague publishes.
- Give a support or ops team a single feed for background work (imports, exports, scheduled jobs) without CP access.
Telegram model
- A Telegram group (or channel/supergroup) is the destination.
- A Telegram bot is the sender identity that posts into that group.
- Craft calls the Telegram Bot API using the bot's token.
Without a bot added to the group, Craft has nothing to post through — bot setup always comes first.
Basic setup
- Create a bot with
@BotFatheron Telegram and copy the bot token it gives you. - Create one or more private Telegram groups (or reuse existing ones), one per notification category (see Suggested channels).
- Add the bot to each group.
- Find each group's chat ID (a negative number, e.g.
-1001234567890). The easiest way: add@userinfobotto the group, send any message, and it replies with the chat ID — then remove it again. Alternatively, send one message into the group and openhttps://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdatesin a browser; the chat ID is the negative number next to"chat":{"id":. - In Craft, open Telegram → Channels and create one channel record per group with its bot token and chat ID — see Usage for the full field reference.
- In Telegram → Settings, pick defaults and send a test message to confirm delivery before relying on it — see Settings.
A bot token can be reused across multiple channels (same bot, several groups), or each channel can use its own bot — both are supported per channel.
Suggested channels
ecommerce— orders, payments, revenue summaries.developer— errors, exceptions, failed jobs, failed email, deploys.operations— imports, exports, background/queue tasks.
Built-in automation
Every channel has an Automation tab where built-in Craft events can be turned on independently:
- Entry saved / deleted
- Asset saved / deleted
- Category saved / deleted
- User saved / deleted
- Email sent / failed (any Craft-sent email, including contact-form style submissions)
Each event can also get a per-channel message override, so the same
"Entry saved" trigger can read differently in a content channel than in a
developer channel. See Usage for the full
walkthrough.
Connecting another plugin
Other plugins in the ecosystem are not limited to the built-in Craft events — they can register their own event types (e.g. "Order completed", "Order paid") which then show up in every channel's Automation tab exactly like the built-in ones, complete with their own default message template. See Developer API for the provider interface, the runtime dispatch call, and the plain PHP send methods available to any plugin or module.
Further reading
- Settings — global delivery defaults, parse mode, logging.
- Usage — creating channels, the Automation tab, verifying a bot, sending test messages, and reading the delivery logs.
- Developer API — registering custom event types, the
MessagesServicePHP API, console command, MCP tools, and plugin events.