Slack slash commands

note
This feature is only configurable on self-managed GitLab instances. For GitLab.com, use the GitLab for Slack app instead.

You can use slash commands to run common GitLab operations, like creating an issue, from a Slack chat environment. To use slash commands in Slack, you must configure both Slack and GitLab.

GitLab can also send events (such as issue created) to Slack as part of the separately configured Slack notifications.

For a list of available slash commands, see Slash commands.

Configure the integration

Slack slash commands are scoped to a project. To configure Slack slash commands:

  1. On the left sidebar, at the top, select Search GitLab () to find your project.
  2. Select Settings > Integrations.
  3. Select Slack slash commands. Leave this browser tab open.
  4. Open a new browser tab, sign in to your Slack team, and start a new Slash Commands integration.
  5. Enter a trigger command. We suggest you use the project name. Select Add Slash Command Integration.
  6. Complete the rest of the fields in the Slack configuration page using information from the GitLab browser tab. In particular, make sure you copy and paste the URL.

    Slack setup instructions

  7. On the Slack configuration page, select Save Integration and copy the Token.
  8. Go back to the GitLab configuration page and paste in the Token.
  9. Ensure the Active checkbox is selected and select Save changes.