Skip to content
Notification channels

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:

  1. Get the webhook URL in the service (steps below).
  2. In MicroB2B, go to Plugins > Webhook Notifiers and click + New Webhook Notifier.
  3. Choose the Format named below and paste the URL into Webhook URL.
  4. Click Create and restart MicroB2B.
  5. 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).

  1. In Slack, create an app at api.slack.com/apps.
  2. Turn on Incoming Webhooks and add a webhook to the channel.
  3. 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).

  1. In Teams, open the channel’s … menu and choose Workflows.
  2. Choose the template Post to a channel when a webhook request is received.
  3. 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).

  1. In Discord, open the channel’s Edit Channel > Integrations > Webhooks.
  2. 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.

  1. In a Chat space, open Apps & integrations > Webhooks.
  2. 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).

  1. 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.

  2. Use the topic URL as the Webhook URL: https://ntfy.sh/<topic> or https://ntfy.example.com/<topic>.

  3. If the topic needs a login, add a line to Additional HTTP Headers:

    • Authorization: Bearer tk_... for an access token, or
    • Authorization: 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:

HeaderValue
TitleThe severity and what happened
Priorityinfo 3 (default), warning 4 (high), critical 5 (urgent)
TagsAn emoji: information_source, warning or rotating_light. A test adds test_tube.
ClickThe 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.