Subscribing to Slack notifications
You can subscribe to real-time notifications on analysis results directly in Slack.
Once your Slack workspace administrator has connected the workspace to SonarQube Server, you can subscribe to Slack notifications for your project. Follow the steps below to subscribe to your project in the Slack channel of your choice.
Step 1: Log in to the SonarQube Server app for Slack
Logging in to the SonarQube Server app for Slack connects your Slack account to your SonarQube Server account. You only need to do this once.
To log in to the SonarQube Server app for Slack:
In your Slack workspace, go to Apps and open the SonarQube Server app.

In the Messages tab, type
/sonarqube-server connect. You will be prompted to connect your SonarQube Server account to Slack.
Step 2: 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 Server 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 Server app for Slack to your channel:
In your Slack workspace, navigate to your private channel.
In the private channel, type
/invite @SonarQube Server.
Step 3: Subscribe your channel to your project
Make sure that you have the Browse permission on the project in SonarQube Server.
All channel members will receive the SonarQube Server notifications on your project.
To subscribe your channel to your project:
In SonarQube Server, copy your project key. You'll find the project key in the Project Information page as illustrated below.

In your Slack workspace, navigate to the channel in which you want to enable the subscription.
In the channel, type
/sonarqube-server subscribe <project_key>.
Unsubscribing a channel from a project
To unsubscribe a channel from a project, you need the Browse permission on the project in SonarQube Server.
Unsubscribing a channel from a project disables the subscription for all members of the channel.
To unsubscribe a channel from a project:
In SonarQube Server, copy the project key. You'll find the project key in the Project Information page.
In your Slack workspace, navigate to the channel subscribed to your project.
In the channel, type
/sonarqube-server unsubscribe <project_key>.
Relates pages
Setting up the connection to Slack About SonarQube Server integration with Slack
Last updated
Was this helpful?

