How to Integrate Slack with Bitbucket
In this article
You can integrate Slack with Bitbucket by installing the official Bitbucket Cloud app from the Slack App Directory and connecting it to your workspace. This lets you get notifications about pull requests, commits, builds, and other repository activity directly in Slack channels, so your team stays informed without switching tabs. The integration is free and works with Bitbucket Cloud; Bitbucket Server/Data Center requires a different approach using webhooks and a Slack incoming webhook. Before you start, make sure you have admin rights to both your Slack workspace and your Bitbucket workspace, and decide which Slack channels should receive which notifications.
What You'll Need
- A Slack workspace where you can install apps (you may need admin approval).
- A Bitbucket Cloud workspace with at least one repository.
- Admin or owner permissions on the Bitbucket workspace to authorize the integration.
- The Slack channels where you want notifications to appear (you can create dedicated channels like #bitbucket-prs or #deployments).
Step-by-Step
- Open the Slack App Directory. In Slack, click your workspace name (top left) and choose Settings & administration > Manage apps. Then click Browse App Directory or go directly to the Slack App Directory website and search for “Bitbucket”.
- Select the Bitbucket Cloud app. The official app is called “Bitbucket Cloud” and is published by Atlassian. Click Add to Slack.
- Authorize the app. Review the permissions requested (typically to post messages and read channel info) and click Allow. You'll be redirected to Bitbucket to log in and authorize the connection.
- Connect your Bitbucket workspace. After authorizing, you'll be asked to choose your Bitbucket workspace. Select the workspace that contains the repositories you want to monitor.
- Choose repositories and events. You can link specific repositories or all repositories in the workspace. Then select which events trigger notifications: pull request created, updated, merged, declined; push (commits); build status changes; and more. You can also set filters like branch names.
- Pick a Slack channel. For each repository or event type, choose the Slack channel where the notification should be posted. You can use the default channel or type a specific channel name. Make sure the Bitbucket app has been invited to that channel (you can do this by typing
/invite @Bitbucketin the channel). - Save and test. Click Save or Connect. To verify, create a test pull request or push a commit to a linked repository; you should see a notification in the chosen Slack channel within a minute.
- Repeat for other repositories or workspaces. If you have multiple repositories or workspaces, you can add more connections from the Bitbucket app's settings page in Slack (under Manage apps > Bitbucket Cloud).
Note: Menu labels and exact wording may vary slightly between Slack versions, desktop vs. mobile, and Bitbucket plan types. The steps above are for the desktop Slack app and Bitbucket Cloud. For Bitbucket Server/Data Center, you'll need to set up a Slack incoming webhook and configure a Bitbucket webhook to post JSON payloads; that's a more technical process and not covered here.
Common Mistakes
- Not inviting the Bitbucket app to the channel. If the app isn't a member of the target channel, it can't post messages. Use
/invite @Bitbucketin the channel. - Choosing the wrong workspace. When authorizing, double-check you're connecting the correct Bitbucket workspace; otherwise, you'll see no notifications for your repos.
- Overlooking event filters. By default, you might get too many notifications. Use filters to limit to specific branches or event types to avoid noise.
- Assuming it works with Bitbucket Server. The official Slack app only supports Bitbucket Cloud. For Server/Data Center, you need a custom webhook setup.
- Forgetting to save settings. After configuring repositories and channels, click the save button; otherwise, changes won't take effect.
Tips
- Create dedicated channels for different types of notifications (e.g., #pr-reviews, #build-alerts) to keep things organized.
- Use Slack's channel notifications settings to mute or highlight messages from the Bitbucket app as needed.
- If you manage multiple Bitbucket workspaces, you can connect them all to the same Slack workspace and route notifications to different channels.
- Regularly review your integration settings to ensure they still match your team's workflow, especially after reorganizing repositories.
- For advanced customization, consider using Bitbucket's webhooks with a custom Slack app or middleware like Zapier, but that's beyond the official integration.
Troubleshooting
If notifications aren't appearing, work through these checks in order:
- Verify the app is invited to the channel. In the target Slack channel, type
/invite @Bitbucketand press Enter. You should see a confirmation. - Check the integration settings. In Slack, go to Manage apps > Bitbucket Cloud and review the connected repositories and event filters. Ensure the events you expect are enabled and the correct channel is selected.
- Confirm the Bitbucket workspace is authorized. Visit the Bitbucket app page in Slack and re-authorize if needed. Sometimes tokens expire or permissions change.
- Test with a simple event. Create a new pull request or push a commit to a linked repository. If no notification appears, try disconnecting and reconnecting the integration.
- Check Slack channel permissions. If the channel is private, the app must be explicitly invited; public channels also require invitation. Also, ensure the app isn't restricted by workspace settings.
- Look for errors in Bitbucket. In Bitbucket, go to Repository settings > Webhooks (for Server) or check the app's connection status in the Slack app settings. For Cloud, the integration status is shown in the Slack app configuration.
- Restart Slack. Close and reopen the Slack app, or refresh the browser if using the web version.
- Contact support. If issues persist, reach out to Atlassian Support or Slack Support with details of your setup.
Frequently Asked Questions
Does the Bitbucket Cloud app work with Bitbucket Server or Data Center?
No, the official Slack app for Bitbucket only supports Bitbucket Cloud. For Server/Data Center, you need to set up a custom webhook integration using Slack incoming webhooks and Bitbucket webhooks, which requires technical configuration.
Can I receive notifications for multiple repositories in one channel?
Yes, you can link multiple repositories to the same Slack channel. In the app settings, add each repository and select the same channel for notifications.
How do I stop notifications for a specific repository?
In Slack, go to Manage apps > Bitbucket Cloud, find the repository in the list, and remove it or disable notifications for that repo. Changes take effect immediately.
Is the integration free?
Yes, the Bitbucket Cloud app for Slack is free to install and use. There are no additional charges from Slack or Atlassian for this integration.
Can I customize the notification messages?
The official app provides standard notification formats and does not offer deep customization of message content. For custom messages, you would need to build your own integration using webhooks and Slack's API.
What permissions does the app need?
The app requests permission to post messages to channels you specify and to read basic channel information. It does not access your Slack messages or files.