> For the complete documentation index, see [llms.txt](https://docs.currents.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.currents.dev/~/changes/TYKBeqcc7WyqjmgOzWzB/resources/integrations/slack.md).

# Slack

Send Playwright and Cypress tests results to Slack

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

![Cypress Tests Results in Slack Channel](https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2Frg2ee5mVsAjYlnMXuuIN%2FCleanShot%202022-02-22%20at%2023.51.35.png?alt=media\&token=d8c3b442-5dc7-4ee6-8211-99096f54a849)

### Enabling Slack integration

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

* Navigate to "Manage Project" section for the selected project
* Click "Add Integration", and select "Slack"
* Enter the details of your Slack Integration and click "Save"

![Enabling Cypress Slack integration](https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FNXMpuxDPkL1YB5mrzikI%2Fcypress-slack-integration.gif?alt=media\&token=c82af364-8eaa-4091-8ec0-9a8e374b403e)

Provide the following details to finalize Slack integration, click "Save" to finish:

* **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](/~/changes/TYKBeqcc7WyqjmgOzWzB/dashboard/runs/run-details.md) to activate filtering.

### Filtering Slack notifications based on Tags

* **Tags Filter (Optional)** - if specified, only send notifications for tagged runs, with at least one tag matching the filter

{% 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 Cypress Run Start event](https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FeHAtly90SP4XsgqWOdMs%2Fslack-cypress-new-run.png?alt=media\&token=f077ce9c-1d76-4738-b63f-90381d858a2e)

#### **Run Finish**

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

![Example of Slack notification for Cypress Run Finished](https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2F07FOSfAtXSyZzVhYLy1b%2Fcypress-slack-run-finisj.png?alt=media\&token=06016df2-7013-4c0e-8491-d7c749cc89f2)

#### 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 Cypress Run Finished with Timeout event ](https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2Fj2cRAOAauG9I7F2SPz23%2Fcypress-slack-run-timeout.png?alt=media\&token=8906ba2e-3c90-44b2-aa46-8aa05d3d0541)

#### 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 Cypress Run Canceled event ](https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FGqeq3btaYDSfOpBf70j5%2Fcypress-run-canceled-slack.png?alt=media\&token=9f981708-1a37-4b8f-9546-a5448afd7026)

### 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&#x20;

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.currents.dev/~/changes/TYKBeqcc7WyqjmgOzWzB/resources/integrations/slack.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
