# Slack Webhook

{% hint style="info" %}
This is the legacy webhook-based Slack integration. For advanced features like multiple destinations, individual test notifications, and annotation-based mentions, see [Slack App](/resources/integrations/slack/slack-app.md).
{% endhint %}

Currents integration with Slack allows posting test results of your Playwright or Cypress tests directly into Slack channels.

![Tests Results in Slack Channel](/files/zOoS46AsVbdCXwSW5TfR)

### Enabling Slack integration

In order to enable Slack integration and share Playwright test results to Slack channels, follow the steps:

* Navigate to **Manage Project > Integrations**
* Add Slack integration and provide the details:
  * **Slack Webhook URL -** Incoming Webhook URL, e.g. `https://hooks.slack.com/services/XXX/YYY/ZZZ`. Read more about [Slack Incoming Webhooks](https://api.slack.com/messaging/webhooks).
  * **Failed Runs Only** - enabling the toggle would only send results for failed runs.
  * **Events (Optional)** - specify events that will trigger the integration and send the results. Leaving this field blank activates all the events.
  * **Branch Name Filter (Optional)** - if specified, only send notifications for runs with branch names matching the pattern. Please note, that you must provide the branch name within the [Run Details](/dashboard/runs/run-details.md) to activate filtering.
* Click **Save** to preserve the changes

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

### Grouping Slack messages

Enabling the **Single Notification for All Groups** toggle ensures that only one notification is sent per run, regardless of how many groups it includes.

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

Note: You may still receive multiple notifications if one group finishes before the others were discovered. For example, if one group completes before the other groups are scheduled or detected, a notification may be sent early.<br>

### Filtering Slack notifications based on Tags

{% hint style="info" %}
**Please note:** We use [glob patterns](https://www.npmjs.com/package/micromatch) to evaluate the filters. Test your filtering rules using the [playground](https://currents-branch-filter.stackblitz.io/). See examples for some popular filter patterns:

* Include only **`tagA`** or **`tagB`**: `(tagA|tagB)`
* Exclude **`tagA`** an&#x64;**`tagB`**`: !(tagA|tagB)`
* Include only tags starting with **`production`**: `production*`
* Include only tags starting with **`smoke-`** or **`prod-`**`: (smoke-*|prod-*)`
  {% endhint %}

### What events trigger notifications for Slack // Currents integration?

The following events trigger notifications for Slack integration.

#### **Run Start**

Triggered when a new run starts. If a run contains multiple groups, the notification will be triggered for each group.

![Example of Slack notification for Run Start event](/files/ZArKrqrbX8GX0BusBPsP)

#### **Run Finish**

Triggered when a run finishes its execution. If a run contains multiple groups, the notification will be triggered for each group.

![Example of Slack notification for Run Finished](/files/lIeldo32f1fmNa2NMFTp)

#### Run Timeout

Triggered when a time out detected for a run. The message will contain the last known results for the run or run group.

![Example of Slack notification for Run Finished with Timeout event](/files/uz3IDeta5854ySz45Ksz)

#### Run Canceled

Triggered when a run gets cancelled. If a run contains multiple groups, the notification will be triggered for each group. The message will contain the last known results for the run or run group.

![Example of Slack notification for Run Canceled event](/files/7zifRlatkAdJJOcWMd4f)

### Disabling Slack integration

To disable Slack integration, simply delete the integration from the list of integrations.

### FAQ

#### Can I have multiple Slack integrations for the same project?

Yes, you can have multiple Slack integrations for the same project.

#### What do notification status colours mean?

<mark style="color:green;">**Green**</mark> - passed tests

<mark style="color:red;">**Red**</mark> - failed + skipped tests

**Grey** - ignored tests

<mark style="color:purple;">**Purple**</mark> - flaky tests


---

# 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.currents.dev/resources/integrations/slack/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.
