> ## Documentation Index
> Fetch the complete documentation index at: https://docs.happyuptime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack paging

Make alerts @-mention the on-call person + ack/resolve from Slack buttons.

# Slack paging

Get pages directly to the on-call person — not to a generic #alerts channel — with @-mentions, ack/resolve buttons, and follow-up commands.

## What you get

- **@-mentions** — the on-call person's `slack_id` is interpolated into the message so they get a real notification (not just channel noise).
- **Block Kit buttons** — Acknowledge / Resolve / Mute 1h / Mute 4h / Escalate. All work from Slack with no need to context-switch.
- **Slash commands** — `/happyuptime status`, `/happyuptime ack <id>`, `/happyuptime resolve <id>`, `/happyuptime mute <monitor> 1h`, `/happyuptime oncall`.

## Setup

**Install the Slack app**

Dashboard → **Integrations** → Slack card → **Install Slack app**. Approve the OAuth grant. The app needs these scopes:

    - `chat:write` — send messages
    - `commands` — slash commands
    - `channels:read` — list channels for the picker
    - `incoming-webhook` — initial channel grant
    - `users:read` + `users:read.email` — match Happy Uptime users to Slack users
    - `im:write` — DM users for escalation

  **Link your Slack identity**

Settings → Integrations → **Slack identity** card → **Auto-match by email**. This stores your `slack_id` on your user. Now alerts can `<@your-slack-id>` you.

    For team members: an admin can run **Link team by email** on the OnCall → Team tab to bulk-match everyone.

  **Wire alert rules to on-call**

Open any alert rule (Alerts → Channels → click a `slack_app` channel → **Rules** tab) and toggle **Notify on-call**. Optionally pick a specific schedule (otherwise the org's default schedule wins).

    Now when that monitor fires, the dispatcher:
    1. Finds the schedule's primary on-call user.
    2. Adds a `📟 Paging on-call (Engineering): @sean` block to the Slack message.
    3. Posts to the schedule's configured Slack channel (overriding the rule's channel).

  **Test the flow**

Schedule's **Test** button fires a synthetic page using real on-call resolution. The on-call person sees a Slack DM (if they're not the channel) and the channel message with their @-mention.

## What an alert looks like

```
📟 Paging on-call (Engineering): @sean

🔴 Down: api.happyuptime.com
URL:               https://api.happyuptime.com/health
Status:            500
Region:            us-east
On-Call (Eng):     Sean Geng

Error:
  ```
  HTTP 500: Internal Server Error
  ```

[ Acknowledge ] [ Resolve ] [ Mute 1h ] [ Mute 4h ] [ Escalate ]
```

## Slash commands

| Command | What it does |
|---|---|
| `/happyuptime status` | List all monitors, grouped by status |
| `/happyuptime ack <id-or-title>` | Acknowledge an open incident — stops escalation |
| `/happyuptime resolve <id-or-title>` | Mark an incident resolved |
| `/happyuptime mute <monitor> <duration>` | Suppress alerts (e.g. `mute api 30m`) |
| `/happyuptime oncall` | Show who's on call across every schedule, with handoff time |

## Channel routing per schedule

Each schedule has a `slack_channel_id`. If set, alerts that target this schedule via `notify_oncall` post to that channel — overriding the alert rule's default channel. Useful when you have multiple on-call rotations going to different team channels.

## Troubleshooting

**Auto-match returns 'missing_scope'**

The Slack app was installed before `users:read.email` was a required scope. Reinstall:
    Integrations → Slack card → **Reinstall Slack app**. Existing channels and routing are preserved.

  **On-call mention shows as plain text instead of @-mention**

The user's `slack_id` is null. Check **Team** tab — anyone without "Slack linked" badge needs to run identity match. Use **Link team by email** to fix everyone at once.

  **Channel picker shows 'Loading...' forever**

The Slack app may have been disconnected. Check Integrations → Slack card. Reinstall if the badge says "needs reinstall".