GitLab for Slack app administration

Introduced for self-managed instances in GitLab 16.2.

note
This page contains information about administering the GitLab for Slack app for self-managed instances. For user documentation, see GitLab for Slack app.

The GitLab for Slack app distributed through the Slack App Directory only works with GitLab.com. On self-managed GitLab, you can create your own copy of the GitLab for Slack app from a manifest file and configure your instance.

The app is a private one-time copy installed in your Slack workspace only and not distributed through the Slack App Directory. To have the GitLab for Slack app on your self-managed instance, you must enable the integration.

Create a GitLab for Slack app

Prerequisite:

To create a GitLab for Slack app:

  • In GitLab:

    1. On the left sidebar, select Search or go to.
    2. Select Admin Area.
    3. On the left sidebar, select Settings > General.
    4. Expand GitLab for Slack app.
    5. Select Create Slack app.

You’re then redirected to Slack for the next steps.

  • In Slack:

    1. Select the Slack workspace to create the app in, then select Next.
    2. Slack displays a summary of the app for review. To view the complete manifest, select Edit Configurations. To go back to the review summary, select Next.
    3. Select Create.
    4. Select Got it to close the dialog.
    5. Select Install to Workspace.

Configure the settings

After you’ve created a GitLab for Slack app, you can configure the settings in GitLab:

  1. On the left sidebar, select Search or go to.
  2. Select Admin Area.
  3. On the left sidebar, select Settings > General.
  4. Expand GitLab for Slack app.
  5. Select the Enable GitLab for Slack app checkbox.
  6. Enter the details of your GitLab for Slack app:
    1. Go to Slack API.
    2. Search for and select GitLab (<your host name>).
    3. Scroll to App Credentials.
  7. Select Save changes.

Test your configuration

To test your GitLab for Slack app configuration:

  1. Enter the /gitlab help slash command into a channel in your Slack workspace.
  2. Press Enter.

You should see a list of available Slash commands.

To use Slash commands for a project, configure the GitLab for Slack app for the project.

Update the GitLab for Slack app

Prerequisite:

When GitLab releases new features for the GitLab for Slack app, you might have to manually update your copy to use the new features.

To update your copy of the GitLab for Slack app:

  • In GitLab:

    1. On the left sidebar, select Search or go to.
    2. Select Admin Area.
    3. On the left sidebar, select Settings > General.
    4. Expand GitLab for Slack app.
    5. Select Download latest manifest file to download slack_manifest.json.
  • In Slack:

    1. Go to Slack API.
    2. Search for and select GitLab (<your host name>).
    3. On the left sidebar, select App Manifest.
    4. Select the JSON tab to switch to a JSON view of the manifest.
    5. Copy the contents of the slack_manifest.json file you’ve downloaded from GitLab.
    6. Paste the contents into the JSON viewer to replace any existing contents.
    7. Select Save Changes.

Connectivity requirements

To enable the GitLab for Slack app functionality, your network must allow inbound and outbound connections between GitLab and Slack.

  • For Slack notifications, the GitLab instance must be able to send requests to https://slack.com.
  • For Slash commands and other features, the GitLab instance must be able to receive requests from https://slack.com.

Troubleshooting

Slash commands return /gitlab failed with the error "dispatch_failed" in Slack

Slash commands might return /gitlab failed with the error "dispatch_failed" in Slack. To resolve this issue, ensure: