> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cloud/managing-your-account/subscribing-to-slack-notifications.md).

# Subscribing to Slack notifications

How to subscribe to real-time notifications on analysis results directly in Slack.

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