# Alert channels: Slack, Discord, Telegram and webhooks

> Post payment, new customer and goal alerts, traffic spikes and reports to Slack, Discord, Telegram or any webhook, with signed JSON for Zapier, Make and n8n.

Source: https://metricraven.com/docs/alert-channels  
Markdown: https://metricraven.com/docs/alert-channels.md  
Section: Features

Alerts don’t have to live in an inbox. Add a channel and a payment, a new customer or a signup shows up in your team’s Slack, Discord or Telegram the moment it happens, with the source, landing page and country that brought it. A signed webhook sends the same data to Zapier, Make, n8n or your own code.

## How channels work

| What | Where it goes |
| --- | --- |
| Conversion alerts (goal, any payment, new customer) | Each alert picks its channels next to its email recipients, or instead of them. See [conversion alerts](https://metricraven.com/docs/goal-alerts). |
| Busy-hour summaries | Go to the same channels as the alert: after five posts in an hour, one summary an hour later. |
| Traffic spikes, weekly and monthly reports | Switched on per channel. Reports go out Mondays and on the 1st at 8:00 in the channel’s time zone (the zone of whoever added it). See [traffic spike alerts](https://metricraven.com/docs/traffic-spike-alerts) and [email reports](https://metricraven.com/docs/email-reports). |

A site can have up to 10 channels. Only admins and the owner add, change or remove them. Channels are per site, so the whole team sees the same posts and nobody has to unsubscribe from anything.

## Add a channel

1. **Open Settings → Notifications**

   Under **Alert channels**, choose **Add channel** and pick Slack, Discord, Telegram or Webhook.

2. **Paste the URL, or connect Telegram**

   Follow the steps for that service below. Give the channel a name you’ll recognise, such as #sales.

3. **Pick what else posts there**

   Tick **Traffic spikes**, **Weekly report** or **Monthly report** if you want them in this channel too.

4. **Send a test, then attach it to alerts**

   **Send test** on the channel’s row posts a sample message right away. Then open an alert’s **Recipients** (or create a new alert) and tick the channel under **And post to**.

The same channels are listed under Settings → Integrations (Alerts & notifications), each with its status.

## Setup guides

| Channel | Guide |
| --- | --- |
| Slack | Paste an incoming webhook URL. [Slack alerts](https://metricraven.com/docs/slack-alerts) |
| Discord | Paste a channel webhook URL. [Discord alerts](https://metricraven.com/docs/discord-alerts) |
| Telegram | Open a link and press Start, in a private chat or a group. [Telegram alerts](https://metricraven.com/docs/telegram-alerts) |
| Webhook | Any https URL, signed with HMAC-SHA256, with the payload reference, verification code and Zapier, Make and n8n recipes. [Webhooks](https://metricraven.com/docs/webhooks) |

> **Verify it works**
>
> **Send test** answers right on the row: “Test sent” or the exact error (for example “Slack says this webhook no longer exists (404)”). After a real alert, **Recent alert emails** shows each channel’s outcome under the status.

## Delivery, failures and retries

Posts go out within a minute of the conversion, after the alert’s emails, one channel at a time. Each request waits up to 5 seconds, never follows redirects, and only reaches public addresses (URLs that resolve to private or local networks are refused). A channel that fails doesn’t stop the other channels or the emails: the error is shown on the channel’s row and in Recent alert emails, and the next alert tries again. Answer with any 2xx status to accept a webhook.

Webhook URLs, signing secrets and Telegram chats are stored encrypted. The dashboard and API only ever show a masked form, such as `hooks.slack.com/…a1B2`.

## Manage channels with the API

Use an [account token](https://metricraven.com/docs/api-authentication) (read to list, write to change) or the site’s secret key, with `?site=<website id>`.

| Request | Does |
| --- | --- |
| GET /api/v1/alerts/channels | Channels with id, type, name, status (active or pending), target (masked), events, timeZone, alertCount, lastDeliveredAt and lastError, plus available (the types this server can add) and limit. |
| POST /api/v1/alerts/channels | Adds a channel. Body: type (slack, discord, telegram or webhook), url (not for Telegram), optional name, events ({ spike, weeklyReport, monthlyReport }) and timeZone. A webhook answers with signingSecret, Telegram with connectUrl and groupConnectUrl, once. |
| PATCH /api/v1/alerts/channels/{id} | Changes name, events, timeZone or url. rotateSecret: true (webhooks) answers with a new signingSecret; reconnect: true (Telegram) with new links. |
| DELETE /api/v1/alerts/channels/{id} | Removes the channel and takes it off every alert. |
| POST /api/v1/alerts/channels/{id}/test | Posts a test message now. Answers data.sent and data.error. |
| channels on POST/PATCH /api/v1/alerts | The channel IDs an alert posts to. With channels and no recipients, the alert posts only to the channels; an alert needs at least one member or channel. |

```bash
curl -X POST "https://metricraven.com/api/v1/alerts/channels?site=$SITE_ID" \
  --header "Authorization: Bearer $METRICRAVEN_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"type":"slack","name":"#sales","url":"https://hooks.slack.com/services/T000/B000/XXXX","events":{"spike":true}}'

curl -X PATCH "https://metricraven.com/api/v1/alerts/$ALERT_ID?site=$SITE_ID" \
  --header "Authorization: Bearer $METRICRAVEN_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"channels":["<channel id>"]}'
```

The same actions are available as [MCP tools](https://metricraven.com/docs/mcp-tools): `list_alert_channels`, `create_alert_channel`, `test_alert_channel`, `delete_alert_channel`, and `channels` on `create_alert` and `update_alert`. From a terminal, use the [CLI](https://metricraven.com/docs/cli-commands#changes): `metricraven alerts channels list`, `metricraven alerts channels add slack --url <URL>`, `test`, `rotate-secret` and `remove`, and `--channel <id>` on `metricraven alerts create` and `update`.
