# Subscribing to Slack notifications

Once your Slack workspace admin [has connected the workspace to SonarQube Cloud](/sonarqube-cloud/administering-sonarcloud/integrations/setup.md), you can subscribe to Slack notifications for your project. To do so, you subscribe to your project in the Slack channel of your choice.

{% hint style="info" %}
For more information about the Slack integration in SonarQube Cloud, check out this [video](https://www.youtube.com/watch?v=oW-pp4LN9r0) on how to benefit from the Slack integration, or see [Slack](/sonarqube-cloud/discovering-sonarcloud/integrations/integration-overview.md).
{% endhint %}

{% stepper %}
{% step %}
**Connect your Slack and SonarQube Cloud accounts**

You only need to perform this step once.

Proceed as follows:

1. In your Slack workspace, navigate to any channel.
2. In the channel, type `/sonarqube connect`. You will be prompted to connect your account.
   {% endstep %}

{% step %}
**Prepare the channel to be used for subscription**

You must select the Slack channel to be used to receive your project’s notifications. You can create a new one. Note that:

* All channel members will receive the SonarQube Cloud notifications.
* You can use the same channel to receive the notifications on different projects distributed across various organizations.
* You may need specific permissions to add the app to private channels.

If your Slack channel is private, you need to add the SonarQube App for Slack to your channel:

1. In your Slack workspace, navigate to your private channel.
2. In the private channel, type `/invite @SonarQube`.
   {% endstep %}

{% step %}
**Subscribe your channel to your project**

Make sure that you have the Browse permission on the project in SonarQube Cloud.

{% hint style="warning" %}
All channel members will receive the SonarQube Cloud notifications on your project.
{% endhint %}

To subscribe your channel to your project:

1. In SonarQube Cloud, copy your project key. See [Retrieving projects](/sonarqube-cloud/managing-your-projects/retrieving-projects.md#viewing-project-information).
2. In your Slack workspace, navigate to the channel in which you want to enable the subscription.
3. In the channel, type `/sonarqube subscribe <project_key>` .
   {% endstep %}
   {% endstepper %}

## Unsubscribing a channel from a project

To unsubscribe a channel from a project, you need the Browse permission on the project in SonarQube Cloud.

{% hint style="warning" %}
Unsubscribing a channel from a project disables the subscription for all members of the channel.
{% endhint %}

To unsubscribe a channel from a project:

1. In SonarQube Cloud, copy the project key. See [Retrieving projects](/sonarqube-cloud/managing-your-projects/retrieving-projects.md#viewing-project-information).
2. In your Slack workspace, navigate to the channel subscribed to your project.
3. In the channel, type `/sonarqube unsubscribe <project_key>`.

## Related pages

* [Slack](/sonarqube-cloud/discovering-sonarcloud/integrations/integration-overview.md) (integration overview)
* [Connecting SonarQube Cloud to Slack](/sonarqube-cloud/administering-sonarcloud/integrations/setup.md)


---

# 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.sonarsource.com/sonarqube-cloud/managing-your-account/subscribing-to-slack-notifications.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.
