doc/user/project/integrations/mattermost_slash_commands.md
{{< details >}}
{{< /details >}}
You can use slash commands to run common GitLab operations, like creating an issue, from a Mattermost chat environment.
GitLab can also send events (such as issue created) to Mattermost as part of the
separately configured Mattermost notifications.
For a list of available slash commands, see Slash commands.
GitLab provides different ways to configure Mattermost slash commands. For any of these options, you must have Mattermost 3.4 or later.
If Mattermost is installed on the same server as GitLab, you can automatically configure Mattermost slash commands:
To manually configure slash commands in Mattermost, you must:
To enable custom slash commands from the Mattermost administrator console:
TRUE:
To get configuration values from GitLab:
To create a slash command in Mattermost:
In the Mattermost browser tab, go to your team page.
Select the {{< icon name="ellipsis_v" >}} Settings icon, and select Integrations.
In the left sidebar, select Slash commands.
Select Add Slash Command.
Provide a Display Name and Description for your new command.
Provide a Command Trigger Word based on your application's configuration:
/gitlab for your trigger word./project-name or /gitlab-project-name.For Request URL, paste the value you copied from GitLab.
For all other values, you may use the suggestions from GitLab or your preferred values.
Copy the Token value, and select Done.
Creating a slash command in Mattermost generates a token you must provide to GitLab:
Your slash command can now communicate with your GitLab project.
Prerequisites:
To interact with GitLab using Mattermost slash commands:
You can see all authorized chat accounts in your Mattermost profile page under Chat.
When a Mattermost slash command does not trigger an event in GitLab: