Notification Plugins
Build a notification plugin that subscribes to platform events — new orders, paid invoices, fresh tickets — and posts to Telegram, Discord, or Slack. Covers subscribable events, the Format Message and HTTP Request flow, the built-in channel scaffolding, and per-event message templates.
A notification plugin listens for things that happen in FluxBilling — a new order, a paid invoice, a fresh support ticket — and sends a message to an outside channel like Telegram, Discord, or Slack. You build it the same way as any other plugin, with a connection, a configuration form, and a flow. The difference is how it's triggered: instead of being called for a service or payment operation, a notification plugin subscribes to platform events, and the platform runs your flow each time a subscribed event fires. This article shows you which events you can subscribe to, how a notification flow formats and sends a message, the ready-made channel scaffolding that gets you started in minutes, and how to write per-event message templates.
New to flows? Read Building Flows and Node Reference first — this article builds on the Format Message and HTTP Request nodes.
Events you can subscribe to
When you set up a notification plugin you choose which events should trigger it. Each event carries data about what happened, which you reference in your message with {{data.*}} placeholders. The events you can route on are:
| Area | Events |
|---|---|
| Orders | order.created, order.paid, order.cancelled |
| Services | service.provisioning, service.activated, service.suspend, service.unsuspend, service.terminate, service.renewed |
| Payments | payment.processing, payment.completed, payment.failed, payment.refunded |
| Invoices | invoice.created, invoice.paid, invoice.overdue |
| Users | user.registered, user.verified |
| Tickets | ticket.created, ticket.replied, ticket.closed |
The notification settings let you toggle the order, service, payment, invoice, user, and ticket events listed above. Monitoring and uptime alerts are delivered through the platform's own alerting and are not part of this per-event subscribe list.
You can subscribe one plugin to many events, and run a different (or the same) flow for each.
How a notification flow is shaped
A notification flow almost always has the same two-step shape:
Start → Format Message → HTTP Request → End
- Start receives the event data from the platform.
- Format Message turns a template into a message payload shaped for your channel (plain text, Markdown, a Slack Block Kit body, a Discord embed, and so on).
- HTTP Request posts that payload to the channel through your connection.
- End finishes the flow.
The Format Message node is the heart of it. You give it a template (text with {{data.*}} placeholders) and a format, and it produces a payload in that format. The supported formats and what each one produces:
| Format | Produces | Use for |
|---|---|---|
text |
A plain-text message | Simple, unstyled channels |
markdown |
A message tagged as Markdown | Channels that render Markdown |
html |
An HTML-escaped message | Channels that accept HTML |
slack_blocks |
A Slack Block Kit payload (header, section, divider, context) | Slack |
discord_embed |
A Discord embed (description, color, timestamp, optional title) | Discord |
telegram |
A Telegram Markdown message (with an optional bold title) | Telegram |
You can also pass a title and a color to the node — the Slack and Discord formats use them for the header and embed accent color.
Ready-made channel scaffolding
You don't have to build the connection and flow from scratch. The platform ships built-in scaffolding for Telegram, Discord, and Slack, and it's applied automatically based on the plugin's name. When you create a notification plugin whose name (or slug) contains telegram, discord, or slack, the platform seeds the matching connection (already pointed at the right API), a configuration form with the fields that channel needs, a send flow wired around Format Message → HTTP Request, and a starting set of per-event message templates. You then fill in your credentials and adjust the wording. A plugin whose name doesn't match a known channel still gets a generic single-send flow you can wire up to any provider.
Telegram
| Field | Type | Notes |
|---|---|---|
bot_token |
secret | Your Telegram bot token |
chat_id |
text | The chat or channel the bot posts to |
parse_mode |
choice | Markdown, MarkdownV2, or HTML (default Markdown) |
The send flow posts your message to Telegram's send-message endpoint. The Format Message node uses the telegram format.
Discord
| Field | Type | Notes |
|---|---|---|
webhook_url |
secret | The Discord webhook URL to post to |
username |
text | Display name for the webhook (defaults to FluxBilling) |
avatar_url |
url | Optional avatar image |
embed_color |
text | Accent color for the embed |
The send flow posts an embed to the webhook. The Format Message node uses the discord_embed format.
Slack
| Field | Type | Notes |
|---|---|---|
webhook_url |
secret | The Slack incoming-webhook URL |
channel |
text | Optional channel override |
username |
text | Display name for the message (defaults to FluxBilling) |
icon_emoji |
text | Optional emoji icon (default :bell:) |
The send flow posts a Block Kit message to the webhook. The Format Message node uses the slack_blocks format.
For all three, the credential (bot token or webhook URL) lives in your configuration and is referenced in the connection with {{config.*}} — see Configuration Settings and Connections and Authentication.
Per-event message templates
Each event you subscribe to gets its own message template, so an order.created message can read differently from a ticket.created one. Templates are ordinary text with {{data.*}} placeholders that the platform fills in from the event. For example:
New order #{{data.orderNumber}} from {{data.customerName}}
Total: {{data.total}} {{data.currency}}
New ticket: "{{data.subject}}"
From: {{data.customerName}} ({{data.email}})
Priority: {{data.priority}}
The exact fields available depend on the event — an order event exposes order details, a ticket event exposes ticket details, a payment event exposes amounts. Use the flow builder's test feature to fire a sample event and see precisely which {{data.*}} fields come through, then reference those in your template. For formatting amounts, the templates can use the platform's currency helper alongside the raw values.
The seeded templates already include sensible defaults for the common events (new orders, new tickets, completed payments, and new registrations), which you can edit to match your tone.
Worked example: post new orders to Slack
- Start the plugin. In the Plugins area, create a new Notification plugin and give it a name that includes Slack (for example, Slack Notifications). Because the name matches a known channel, the platform auto-seeds a Slack connection, configuration fields, a send flow, and default message templates.
- Add your webhook. Open the configuration form and paste your Slack incoming-webhook URL into
webhook_url. Optionally set a channel and username. - Subscribe to the event. Turn on the
order.createdevent in the plugin's notification settings and point it at the send flow. - Write the message. Edit the
order.createdtemplate, for example::tada: New order *#{{data.orderNumber}}* from {{data.customerName}} — {{data.total}} {{data.currency}} - Confirm the flow shape. Open the send flow and check it ends with a Format Message → HTTP Request send step, with the Format Message node set to the
slack_blocksformat. - Test it. Use the builder's test run to fire a sample
order.createdevent and verify the message lands in your Slack channel. Adjust the template until it reads the way you want. - Enable the plugin. Move it out of Draft. From now on, every new order posts to Slack automatically.
To also announce paid invoices, turn on the invoice.paid event, give that event its own template, and reuse the same send flow.
Tips
- Keep credentials in configuration, never hard-coded in a flow — reference them with
{{config.*}}. See Configuration Settings. - Match the format to the channel:
telegramfor Telegram,discord_embedfor Discord,slack_blocksfor Slack, andtext/markdown/htmlfor generic webhooks. - One plugin can serve many events — subscribe to as many as you like and tailor each template.
- Test with sample events before enabling, so you know exactly which
{{data.*}}fields are available for each event.
Related: Building Flows · Node Reference · Variables and Expressions · Capabilities and Flow Contracts · Connections and Authentication · Configuration Settings · Packaging, Importing, and Updating
