Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fnotification-center%2Fuser-scenarios%2Falerts-to-slack.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fnotification-center%2Fuser-scenarios%2Falerts-to-slack.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# Example: route alerts to Slack

This example shows how to route alert notifications to a Slack workspace using Notification Center.<br /><!-- -->The workflow uses a connector, a preset, and a router to send alerts to specific Slack channels based on alert priority.

## Workflow overview[​](#workflow-overview "Direct link to Workflow overview")

1. Create a Slack connector: defines where notifications are sent
2. Create a preset: defines how messages appear in Slack
3. Create a router and routing rules: defines which alerts go to Slack
4. Label alerts: ensures alerts match the correct router

## Create a Slack connector[​](#create-a-slack-connector "Direct link to Create a Slack connector")

1. Go to **Integrations**, then **Notification Center**, then **Connectors**.

2. Select **+ New connector**.

3. Select **Slack** as the destination type.

4. In **Details**, enter a connector name and optional description.

5. In **Configuration**:

   * **Integration:** Select the Slack integration. Create one if none exists.
   * **Channel:** Enter a default Slack channel (for example, `#infra-alerts`).

6. (Optional) Select **Advanced**, then **Dynamic fields**, define a dynamic channel.

   **Example:**

   ```
   {% if alert.highestPriority == "P1" %}

   critical-alerts

   {% else %}

   general-alerts

   {% endif %}
   ```

7. Select **Send test notification** to confirm delivery.

8. Select **Create connector**.

## Create a preset (optional)[​](#create-a-preset-optional "Direct link to Create a preset (optional)")

If you do not need message customization, use the system preset and skip this section.

To create a custom preset:

1. Go to **Integrations**, then **Notification Center**, then **Presets**.

2. Open the **Alerts** tab and select **Slack**.

3. Select **+ New alert preset**.

4. Customize message fields:

   | Field           | Example                                             |
   | --------------- | --------------------------------------------------- |
   | **Title**       | `[{{ alert.highestPriority }}] {{ alertDef.name }}` |
   | **Description** | `{{ alertDef.description }}`                        |
   | **Footer**      | `Triggered at {{ alert.timestamp }}`                |

5. Use the **Preview** panel to review output.

6. (Optional) Use **Send test notification** to validate with your Slack connector.

7. Select **Create preset**.

## Create a router and routing rule[​](#create-a-router-and-routing-rule "Direct link to Create a router and routing rule")

1. Go to **Integrations**, then **Notification Center**, then **Routers**.

2. Select **+ New router**.

3. In **Details**, enter a name such as `Production Alerts`.

4. In **Routing labels**, add labels that this router matches:

   ```
   group:sre

   environment:prod
   ```

5. Matching alerts appear in the **Matching entities** panel.

6. After creating the router, add a routing rule:

   * **Condition**

     ```
     alert.highestPriority == "P1"
     ```

   * **Destination**

     * Connector: `Slack – Prod`
     * Preset: `Slack Critical Alerts`

7. (Optional) In **Fallback**, select a connector for unmatched alerts.

8. Select **Create router**.

## Add labels to alerts[​](#add-labels-to-alerts "Direct link to Add labels to alerts")

1. Go to **Alerts**, then **Create alert**.

2. In **Labels**, add routing labels that match your router:

   ```
   routing.team:sre

   routing.environment:prod
   ```

3. In **Notifications**, select **Notification Center**.

4. Save the alert.

## Example result[​](#example-result "Direct link to Example result")

A triggered alert produces a Slack message similar to:

**Title:**<br />`[P1] CPU Usage High – Production`

**Body:**<br />`CPU usage for host server-1 exceeded 95%.`

**Footer:**<br />`Triggered at 2025-11-11 10:04 UTC`

## Next steps[​](#next-steps "Direct link to Next steps")

Route critical alerts to PagerDuty using connectors, presets, and routing rules in [Route p1 alerts to PagerDuty](https://coralogix.com/docs/docs/user-guides/notification-center/user-scenarios/alerts-to-pagerduty/.md).
