Are you looking for how to do GitLab and Slack integration?. I recently did a new setup of GitLab server to be used by the company for internal projects. After completing the setup, I looked at ways to get notifications for all GitLab project actions – Push, Merge requests, issues, notes e.t.c.

gitlab slack integration for notifications

Since we use Slack as a primary communication channel, it was for a fact we had to do Slack and GitLab integration. In this guide, I’ll share with you the steps I used to setup GitLab and Slack Integration for notifications.

If you don’t have GitLab already installed, refer to our installation guides:

Install Gitlab CE on Ubuntu 18.04 / Debian 9

Install Gitlab CE on CentOS 7 / Fedora 29 / Fedora 28

After the installation, you might be interested in securing your GitLab Server with SSL Certificate. For those using FreeIPA for user authentication, integrating GitLab with FreeIPA is also viable.

How to configure GitLab and Slack Integration

Once you have both GitLab and Slack services working. Below are the steps you’ll follow to get the integration working.

  1. Create Slack Channel for GitLab project
  2. Get the Webhook URL for the channel
  3. Configure Webhook URL in GitLab Project.

Step 1: Create Slack Channel

Sign in to your Slack team and start a new Incoming WebHooks configuration. If you have Channel already created, choose it from the “Choose a channel” dropdown.

gitlab slack integration 02

If you don’t have a Channel created, click the “create a new channel” link.

gitlab slack integration 01

Fill Channel details, to be specific:

  • Select if Channel is Private or Public – This will likely be Private where you invite members to the channel.
  • Channel name
  • Purpose of the channel – Description
  • For Private channel, select list of guys to send invites to – This can be done later

When done, click on “Create Channel“. Confirm that the correct channel has been chosen then click Add Incoming WebHooks integration.

gitlab slack integration 03

Copy the given Webhook URL and proceed to Step 2.

gitlab slack integration 04

Step 2: Configure Webhook URL on GitLab

1.Login to your GitLab Dashboard and navigate to Project > Settings > Integrations.

gitlab slack integration 05

2.Under the “Integrations” section, click on “Slack notifications” to activate it.

gitlab slack integration 06

Check the Active checkbox to turn on the service.

gitlab slack integration 07

3.Check the checkboxes corresponding to the GitLab events you want to send to Slack as a notification.

4.Paste the Webhook URL that you copied from the Slack Configuration step inside the Webhook box.

gitlab slack integration 08

5. Click on “Test settings and save changes” to validate your settings.

If the configuration was successful, you should receive a test commit message in your Slack channel.

gitlab slack integration 09

There you go!. You have successfully integrated your GitLab project and Slack channel to receive notifications for all repository events.

GitLab CI Learning Courses:

Git Learning Video Courses:

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here