Notification channels
This page shows how to send MicroB2B’s alerts to Slack, Microsoft Teams, Discord, Google Chat and ntfy. For the notifier’s settings, see Notifications.
Each service gives you a webhook URL. That URL is the password: anyone who has it can post to your channel. MicroB2B never shows it again once saved.
For each service:
- Get the webhook URL in the service (steps below).
- In MicroB2B, go to Plugins > Webhook Notifiers and click + New Webhook Notifier.
- Choose the Format named below and paste the URL into Webhook URL.
- Click Create and restart MicroB2B.
- Click Send test notification on the notifier’s edit page. A message labelled TEST appears in the channel.
Alert text can come from a partner, such as a file name. Every format below sends it as plain text, so it cannot format the message or mention people.
Slack
Format: Slack (incoming webhook).
- In Slack, create an app at api.slack.com/apps.
- Turn on Incoming Webhooks and add a webhook to the channel.
- Copy the URL. It looks like
https://hooks.slack.com/services/T000/B000/XXXX.
The message has a coloured bar by severity and a button to open MicroB2B when the notifier has a Link Base URL.
Mattermost, Rocket.Chat and Zulip also accept Slack webhooks. They show the message’s text line, without Slack’s colour and button.
Microsoft Teams
Format: Microsoft Teams (Workflows webhook).
- In Teams, open the channel’s … menu and choose Workflows.
- Choose the template Post to a channel when a webhook request is received.
- Finish the wizard and copy the URL it shows. It looks like
https://prod-xx.<region>.logic.azure.com/workflows/....
The message is a card with:
- a bold title coloured by severity: red for critical, amber for warning, blue for info;
- the summary and a list of the details;
- an Open in MicroB2B button, when the notifier has a link base.
A card stays under about 24 KB. Details that do not fit are replaced by “… and N more”. If the workflow rejects the card, it answers with a 4xx error. The notification log shows it as failed.
Discord
Format: Discord (webhook).
- In Discord, open the channel’s Edit Channel > Integrations > Webhooks.
- Create a webhook and click Copy Webhook URL. It looks like
https://discord.com/api/webhooks/<id>/<token>.
The message is one embed. It has a title and a colour bar by severity, the summary, the details as fields and a timestamp. The title links to MicroB2B when the notifier has a link base. Details beyond Discord’s limits are replaced by a field “… and N more”.
Alert text can never mention @everyone, @here, a role or a user.
Google Chat
Format: Google Chat (webhook). Webhooks need a Google Workspace account.
- In a Chat space, open Apps & integrations > Webhooks.
- Add a webhook and copy its URL. It looks like
https://chat.googleapis.com/v1/spaces/.../messages?key=...&token=....
The message is a card with the title, the severity in its colour, the summary and the details. It has an Open in MicroB2B button when there is a link base. It also has a plain-text line that Chat shows in its notifications. A message stays under 28 KB. What does not fit is replaced by “… and N more”.
ntfy
Format: ntfy (topic URL).
Choose a topic name that is hard to guess. On ntfy.sh, anyone who knows a topic can read and post to it. Or use your own ntfy server with access control.
Use the topic URL as the Webhook URL:
https://ntfy.sh/<topic>orhttps://ntfy.example.com/<topic>.If the topic needs a login, add a line to Additional HTTP Headers:
Authorization: Bearer tk_...for an access token, orAuthorization: Basic <base64 of user:password>.
There is no other field for the login. The header is write-only, like the URL.
The message body is plain text: the summary, then one key: value line per detail. It stays under 4000 bytes, so ntfy never turns it into an attachment. What does not fit is replaced by “… and N more”.
MicroB2B sets these ntfy headers:
| Header | Value |
|---|---|
Title | The severity and what happened |
Priority | info 3 (default), warning 4 (high), critical 5 (urgent) |
Tags | An emoji: information_source, warning or rotating_light. A test adds test_tube. |
Click | The page about the alert, when there is a link base |
An additional header named Title, Priority, Tags or Click is replaced by MicroB2B’s own. You can set other ntfy headers, such as Delay, Email or Actions, under Additional HTTP Headers.
A system of your own
For n8n, Zapier, Make, Node-RED or a script of your own, use the format Generic JSON. See Notification webhooks.