# Slack Webhook

{% hint style="info" %}
This capability is only available to BYOC deployments. Check out our [pricing page](https://www.groundcover.com/pricing) for more information about subscription plans and the available deployment modes.
{% endhint %}

### Setting Up a Slack Webhook

To get a Slack webhook URL:

1. Go to <https://my.slack.com/services/new/incoming-webhook>
2. Select the channel for notifications
3. Click **Add Incoming Webhook Integration**
4. Copy the generated webhook URL

For more details on Slack setup options, see Slack Integration.

### Configuring Slack Webhook in groundcover

1. In groundcover, go to **Settings → Connected Apps**.
2. Click on 'Slack Webhook'.

<figure><img src="/files/v9EHwfFRUuEhx7r6d3X3" alt=""><figcaption></figcaption></figure>

3. Select a name and paste your webhook URL.

<figure><img src="/files/QzXZtnHKKont4l39q1nY" alt="" width="375"><figcaption></figcaption></figure>

4. **Test the connection** (Optional) - sends a test notification to verify the webhook.
5. **Save**

### Slack Message Payload

groundcover sends messages to Slack using the following format:

```json
{
  "blocks": [
    {
      "type": "header",
      "text": {
        "type": "plain_text",
        "text": ":rotating_light: {{ summary }}"
      }
    },
    {
      "type": "section",
      "fields": [
        { "type": "mrkdwn", "text": "*Status:*\n{{ status }}" },
        { "type": "mrkdwn", "text": "*Severity:*\n{{ severity }}" },
        { "type": "mrkdwn", "text": "*Monitor:*\n{{ monitor_name }}" },
        { "type": "mrkdwn", "text": "*Value:*\n{{ value }}" }
      ]
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "{{ description }}"
      }
    },
    {
      "type": "section",
      "fields": [
        { "type": "mrkdwn", "text": "*Cluster:*\n{{ labels.cluster }}" },
        { "type": "mrkdwn", "text": "*Namespace:*\n{{ labels.namespace }}" }
      ]
    },
    {
      "type": "actions",
      "elements": [
        { "type": "button", "text": { "type": "plain_text", "text": "View Issue" }, "url": "{{ urls.issue }}" },
        { "type": "button", "text": { "type": "plain_text", "text": "View Monitor" }, "url": "{{ urls.monitor }}" },
        { "type": "button", "text": { "type": "plain_text", "text": "Silence" }, "url": "{{ urls.silence }}" }
      ]
    }
  ]
}
```

{% hint style="info" %}
This payload structure is fixed and cannot be customized. Values shown with `{{ }}` are dynamically populated from your monitor configuration. If you need a custom message format, use a [Generic Webhook](/integrations/connected-apps/generic-webhook.md) instead.

**Test mode:** When using "Test the connection", the `status` field will be "test" and other fields may contain placeholder values.
{% endhint %}

#### Payload Field Reference

| Field          | Description                                                                                                                                           |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `summary`      | Issue title from the alert                                                                                                                            |
| `status`       | Alert state: "alerting", "resolved", or "test" (during connection testing)                                                                            |
| `severity`     | Monitor severity (S1, S2, S3, S4)                                                                                                                     |
| `monitor_name` | Name of the monitor                                                                                                                                   |
| `value`        | The value that triggered the alert                                                                                                                    |
| `description`  | Monitor description with variable expansion                                                                                                           |
| `labels.<key>` | Individual label values using `labels.cluster`, `labels.namespace`, etc. Only labels defined in the monitor's group-by or custom labels are available |
| `urls.issue`   | Link to investigate the issue                                                                                                                         |
| `urls.monitor` | Link to the monitor configuration                                                                                                                     |
| `urls.silence` | Link to silence the alert                                                                                                                             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.groundcover.com/integrations/connected-apps/slack-webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
