Overview
The Slack Message event handler sends Mango by Radix IoT alarm notifications directly to a Slack channel, so your operations team sees alerts in the channels they already monitor instead of only in email.
Read the next section before you start. Whether this handler can be configured at all depends on what kind of Slack app your workspace already has, and that is not something you can change after the fact.
Before you begin: this handler needs a classic Slack app
Warning
The Slack Message event handler requires a bot token from a classic Slack app, and Slack no longer allows new classic apps to be created. Mango’s Slack module connects to Slack over the Real Time Messaging (RTM) API, and Slack does not permit bot tokens issued by modern, granular-scope apps to use RTM — only classic app tokens can. Slack blocked the creation of new classic apps in June 2024.
What that means for you:
- If your workspace already has a classic Slack app, you can use its bot token. Existing classic apps continue to work. Follow the steps below.
- If it does not, you cannot create one, and this handler cannot be made to work on this version. Use one of the alternatives below instead.
If you do not have a classic app
Mango offers other event handler types that can reach Slack without this module:
- Email handler — Slack can accept email into a channel. This is the simplest route and is covered in Configuring Event Handlers and Email Alerts.
- Process handler or Script handler — either can post to a Slack incoming webhook, which is part of Slack’s modern app model and has no classic-app requirement. See Configuring Process Event Handlers.
If you need the native Slack Message handler specifically, raise it with Radix IoT support so the requirement is tracked against the module.
Prerequisites
- Mango 4.x or 5.x with the Slack module installed (it is included with your Core license)
- An existing classic Slack app in your workspace, with permission to manage it
- A public Slack channel to post into
- At least one event detector already configured in Mango (see the Configuring Event Handlers and Email Alerts article)
Step 1: Open your existing classic Slack app
- Go to https://api.slack.com/apps
- Select the classic app you intend to use
Danger
Do not add granular Bot Token Scopes to this app. Scopes such as chat:write and chat:write.public belong to Slack’s modern permission model, and bot tokens issued under that model cannot access RTM — which is the only way this handler connects. Adding them can leave you with an app this handler can no longer use.
Step 2: Confirm the app has a bot user
- In the left sidebar, open App Home (Bot Users on the older Slack UI)
- Confirm a bot user exists, and note its display name — you will need it to add the bot to a channel
- If the app has no bot user, add one and save
Step 3: Install the app and copy the bot token
- Navigate to Install App in the left sidebar
- If the app is not installed, click Install to Workspace and click Allow
- Copy the Bot User OAuth Token — it starts with
xoxb-
Danger
The bot token is a secret. Do not paste it into Slack messages, commit it to version control, or share it in documentation. Treat it with the same care as a password.
Step 4: Add the bot to the target channel
Open the public Slack channel where you want alarm notifications to appear and type:
/invite @YourBotName
Confirm the invitation when Slack prompts you.
Info
The channel must be public, and the app must be added to it. Mango’s in-product help for this handler states both requirements without exception. Private channels are not supported by this handler, and there is no scope that removes the need to add the app to the channel.
Step 5: Configure the Slack Message event handler in Mango
- In Mango, navigate to Event handlers
- Add a new handler and select Slack message as the type
- Fill in the configuration:
| Field | Value | Notes |
|---|---|---|
| Name | Descriptive label | e.g., “Critical Alarms to ops-alerts” |
| Slack bot token | xoxb-... |
The token copied in Step 3. Required. |
| Channel | Bare channel name | e.g., building-alarms. Required. |
Warning
Enter the channel name, not the channel ID, and omit the # prefix. Mango resolves the channel by matching your entry against the channel’s name, exactly and case-sensitively. A channel ID such as C04ABCD1234 will never match, and neither will #building-alarms — the # is not part of the name. Mango’s own help puts it plainly: exclude the # prefix. The trade-off is real: because the match is on the name, renaming the channel in Slack breaks the handler, so update this field if someone renames it.
- Click Save
Step 6: Link the handler to event detectors
- In the event handler’s configuration, find the Event types section
- Select the event detector(s) that should trigger Slack notifications
- You can link multiple detectors to the same handler, or create separate handlers for different channels
Routing by severity
A common pattern is sending different alarm levels to different channels. Mango colors the Slack attachment by alarm level — Information green, Urgent and Critical red — so severity is visible at a glance even within one channel:
| Alarm level | Slack channel | Handler name |
|---|---|---|
| Information | building-info |
Slack — Info Alerts |
| Urgent | building-alerts |
Slack — Urgent Alerts |
| Critical | critical-ops |
Slack — Critical Alerts |
Create one Slack Message event handler per channel and link each to the appropriate event detectors. Remember that each channel must be public and must have the app added to it.
Step 7: Test the notification
- Trigger the event detector — either by simulating the condition (e.g., setting a point value above the high limit) or waiting for a real event
- Check the target Slack channel for the notification message
- The message should carry the event text, plus Time, Event #, Instance and Version fields; for data point events it also includes the rendered Value
- If nothing arrives, go straight to
ma.log— this handler reports failures only to the log
Troubleshooting
Note
This handler fails quietly. Every failure path is caught and written to ma.log; nothing is surfaced in the Mango UI. Check the log before assuming the handler did not fire.
Mango’s Slack handler writes exactly two error messages. Search ma.log for these, not for Slack’s own API error codes — those are not what this module logs:
Slack message channel: <name> not found, can't send message.
Mango connected to Slack but could not find that channel. In order of likelihood:
- You entered a channel ID instead of the name — replace it with the bare name
- You included the
#prefix — remove it - The case does not match — the comparison is case-sensitive
- The channel was renamed in Slack — update the field
- The channel is private — not supported; use a public channel
- The app has not been added to the channel — run
/invite @YourBotNamethere
Slack message failed to send (followed by a stack trace)
Everything else, including authentication and connection problems. Read the stack trace:
- The bot token is from a modern, granular-scope app. This is the most common cause on a new setup and it cannot be fixed by changing settings — see Before you begin. RTM rejects these tokens.
- The token was revoked, rotated, or entered incorrectly — reinstall the app and copy the token again
- The token does not start with
xoxb-— you copied the wrong one - The Mango server cannot reach
https://slack.comon port 443 — check outbound HTTPS, proxies and firewalls
Messages are delayed or missing intermittently
- Check Mango system load — under heavy load, event handler execution may be delayed
- Confirm the channel still exists and still has the app added