GitLab for Slack app
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
For administrator documentation, see GitLab for Slack app administration.
The GitLab for Slack app is a native Slack app that provides slash commands, notifications, and the GitLab Duo integration in your Slack workspace. GitLab links your Slack user with your GitLab user so that any command you run in Slack is run by your linked GitLab user.
On GitLab.com, you can install the app from the Slack Marketplace.
Install the GitLab for Slack app
You can install the GitLab for Slack app on a top-level group, a subgroup, or a project:
- To use slash commands and notifications, install the app on any group or project.
- To also use GitLab Duo in Slack, install the app on a top-level group. A subgroup or project install does not turn on GitLab Duo in Slack.
You can start from the settings of the group or project, or from the GitLab for Slack page.
Prerequisites:
- You must have the appropriate permissions to add apps to your Slack workspace.
- On GitLab Self-Managed, an administrator must turn on the integration.
Install from the group or project settings
Prerequisites:
- To use GitLab Duo in Slack, you must have the Owner role for the top-level group.
To install the GitLab for Slack app from the project or group settings:
- In the top bar, select Search or go to and find your project or group. To use GitLab Duo in Slack, find a top-level group.
- In the left sidebar, select Settings > Integrations.
- Select GitLab for Slack app.
- Select Install GitLab for Slack app. You’re redirected to the Slack confirmation page.
- On the Slack confirmation page:
- Optional. If you’re signed in to more than one Slack workspace, in the upper right, from the dropdown list, select the workspace you want to install the app in. On GitLab Self-Managed and GitLab Dedicated, an administrator must first enable support for multiple workspaces for the dropdown list to appear.
- Select Allow.
When you install the app for a group, the integration is also turned on for all subgroups and projects in the group that don’t already have the integration configured. Subgroups and projects that already have the integration configured are not affected, but can use the inherited settings at any time. For more information, see manage group default settings for a project integration. Each project gets a project-specific alias based on its project path, which you can use in slash commands.
The first top-level group that installs the app for a Slack workspace becomes the GitLab Duo group of that workspace. All GitLab Duo sessions from the Slack workspace run in this group and use its GitLab Duo settings and credits. For more information, see choose where GitLab Duo runs.
Install from the GitLab for Slack page
To install the GitLab for Slack app from the GitLab for Slack page:
- Go to the GitLab for Slack page at
https://gitlab.example.com/-/profile/slack/edit. - From the dropdown list, select the top-level group or project to install the app in. To use GitLab Duo in Slack, select a top-level group.
- Select Continue. You’re redirected to the Slack confirmation page.
- On the Slack confirmation page:
- Optional. If you’re signed in to more than one Slack workspace, in the upper right, from the dropdown list, select the workspace you want to install the app in. On GitLab Self-Managed and GitLab Dedicated, an administrator must first enable support for multiple workspaces for the dropdown list to appear.
- Select Allow.
A top-level group is available in the dropdown list when:
- You have the Owner role for the group.
- The group is not archived or scheduled for deletion.
- The group does not have the GitLab for Slack app yet, of its own or inherited. To change an existing installation, install the app from the group settings.
- On GitLab Self-Managed and GitLab Dedicated, beta and experimental features are turned on for the instance.
The dropdown list shows up to 100 groups. If your group is not listed, install the app from the group settings instead.
Install from the Slack Marketplace
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com
To install the GitLab for Slack app from the Slack Marketplace:
- Go to the GitLab for Slack page.
- Select where to install the app, and approve it in Slack, as described in install from the GitLab for Slack page.
Effect on the Slack notifications integration
The deprecated Slack notifications integration is hidden from the list of integrations in a project’s settings when all of the following are true:
- The GitLab for Slack app is available on the instance.
- The project has no Slack notifications integration, including one that is turned off or inherited from a group.
- No Slack notifications integration exists for the instance.
Hiding affects only the list. Projects that have Slack notifications configured still see it in the list and keep receiving notifications.
Reinstall the GitLab for Slack app
When GitLab releases new features for the GitLab for Slack app, you might have to reinstall the app to use these features. The app uses granular permissions. Although functionality has not changed, you should reinstall the app.
To reinstall the GitLab for Slack app:
- In the top bar, select Search or go to and find your project or group.
- In the left sidebar, select Settings > Integrations.
- Select GitLab for Slack app.
- Select Reinstall GitLab for Slack app. You’re redirected to the Slack confirmation page.
- On the Slack confirmation page:
- Optional. If you’re signed in to more than one Slack workspace, in the upper right, from the dropdown list, select the workspace you want to reinstall the app in. On GitLab Self-Managed and GitLab Dedicated, an administrator must first enable support for multiple workspaces for the dropdown list to appear.
- Select Allow.
The GitLab for Slack app is updated for all projects that use the integration.
Alternatively, you can configure the integration again.
GitLab Duo
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
- Status: Limited availability
The availability of this feature is controlled by a feature flag. For more information, see the history. On GitLab Self-Managed and GitLab Dedicated, this feature is available for testing, but not ready for production use.
If you use multiple Slack installations without Slack Enterprise Grid, Slack rate limits GitLab Duo to 15 conversation objects in each minute. This prevents the integration from functioning because a single invocation requests 50 messages from the channel history to use as context. To avoid rate limits for GitLab Duo in Slack, keep all of your Slack workspaces in a single Enterprise Grid organization.
You can interact with GitLab Duo directly from Slack by mentioning the GitLab bot in any channel or thread where the bot is present. GitLab Duo reads the full conversation thread and recent channel history as context, runs a flow, and posts the result back to the Slack thread.
For example, you can ask GitLab Duo to do the following:
- Turn a conversation into a GitLab issue.
- Search for existing issues or merge requests.
- Summarize a discussion thread.
- Answer questions about your projects.
Each interaction runs a GitLab Duo Agent session and consumes GitLab Credits. All sessions from a Slack workspace run in one top-level group, the GitLab Duo group of the workspace. The sessions use the GitLab Duo settings of that group and, on GitLab.com, its GitLab Credits. GitLab Duo acts with the permissions of the person who mentions it.
When mentioned in a channel, the agent reads recent messages from that channel as context for its response. Messages posted after the one it is responding to are not included. After users interact with GitLab Duo, it creates an agent session that is visible only to the person who invoked it.
When you mention the GitLab bot in a thread, the full conversation content (including messages from all participants) is sent to a large language model (LLM) to generate a response. Do not share sensitive information in threads where you mention GitLab Duo.
Set up GitLab Duo in Slack
An Owner of a top-level group sets up GitLab Duo in Slack once for each Slack workspace. After that, members of the group who meet the prerequisites can mention GitLab Duo in Slack. Each user connects their own GitLab account the first time they mention GitLab Duo. For existing installations, reinstall the GitLab for Slack app to grant the additional permissions required for GitLab Duo.
GitLab Duo in Slack does not work in groups that restrict access by IP address, or in their subgroups and projects. Requests start from Slack servers, so GitLab cannot check the IP address of the user against the allowlist, and refuses the session. For more information, see issue 639778.
Prerequisites:
- You must have the Owner role for a top-level group.
- Turn on GitLab Duo and the GitLab Duo Agent Platform in the top-level group.
- On GitLab Self-Managed:
- An administrator must enable the
slack_duo_groupandslack_duo_api_flowfeature flags. - Turn on beta and experimental features for the instance.
- An administrator must enable the
To set up GitLab Duo in Slack:
- Install the GitLab for Slack app on the top-level group.
- In the top bar, select Search or go to and find your top-level group.
- In the left sidebar, select Settings > Integrations.
- Select GitLab for Slack app.
- In the GitLab Duo section, if GitLab Duo is off for the Slack workspace, turn the toggle on. If GitLab Duo cannot answer in Slack, the section lists the settings to fix.
On GitLab Self-Managed, when an administrator installs the app for the instance, only an administrator can choose the GitLab Duo group of that Slack workspace.
Choose where GitLab Duo runs
On GitLab Self-Managed, the availability of this feature is controlled by feature flags. For more information, see the history.
Each Slack workspace has one GitLab Duo group: the top-level group where its GitLab Duo sessions run. Until a group is chosen, GitLab Duo is off for the workspace. When someone mentions GitLab Duo, the reply says who can turn it on.
The first top-level group that installs the GitLab for Slack app becomes the GitLab Duo group. This happens only if the Slack workspace does not have a GitLab Duo group yet. Installing the app on a subgroup or project does not choose a GitLab Duo group. Reinstalling the app never moves GitLab Duo to another group.
Turn GitLab Duo on or off for a Slack workspace
Prerequisites:
- You must have the Owner role for the top-level group.
- The Slack workspace must be connected to the group. To connect it, install the GitLab for Slack app on the group.
To turn GitLab Duo on or off for a Slack workspace:
- In the top bar, select Search or go to and find your top-level group.
- In the left sidebar, select Settings > Integrations.
- Select GitLab for Slack app.
- In the GitLab Duo section, turn the toggle for the Slack workspace on or off. To turn GitLab Duo off, select Turn off GitLab Duo to confirm.
If GitLab Duo cannot answer in Slack, the section lists the settings to fix in the group.
Turning off GitLab Duo affects only new mentions in Slack. Sessions that already run continue, and GitLab Duo in GitLab is not affected.
A Slack workspace has only one GitLab Duo group. If another group already runs GitLab Duo for the workspace, the GitLab Duo section says so. The section names that group only if you can view it. To move GitLab Duo to your group, an Owner of the other group must turn it off first.
GitLab Duo turns off for the Slack workspace when the GitLab Duo group:
- Is archived or scheduled for deletion.
- Is transferred and is no longer a top-level group.
- No longer has an installation of the GitLab for Slack app for the workspace, in the group or in any of its subgroups or projects.
The GitLab for Slack app settings of subgroups and projects show where GitLab Duo runs for their Slack workspace, and who can change it. Notification and slash command settings are not affected.
Choose the GitLab Duo group of the instance workspace
- Offering: GitLab Self-Managed
When an administrator installs the GitLab for Slack app for the instance, only an administrator chooses the GitLab Duo group of that Slack workspace. Installing the app on a group does not choose the GitLab Duo group of that Slack workspace.
Prerequisites:
- You must be an administrator.
To choose the GitLab Duo group of the Slack workspace installed for the instance:
- In the upper-right corner, select Admin.
- In the left sidebar, select Settings > Integrations.
- Select GitLab for Slack app.
- In the GitLab Duo section, from the Choose a top-level group dropdown list, select a group.
- Select Turn on GitLab Duo.
To move GitLab Duo to another group, select the other group, then select Move GitLab Duo. To turn GitLab Duo off, select Turn off GitLab Duo, then select Turn off GitLab Duo again to confirm.
Use GitLab Duo in Slack
The availability of the Guest role requirement is controlled by a feature flag. For more information, see the history.
Each user must connect their own GitLab account the first time they mention GitLab Duo. Without a linked account, GitLab Duo does not run your request.
Prerequisites:
- GitLab Duo in Slack must be set up.
- You must have at least the Guest role for the GitLab Duo group, or for a subgroup or project in it,
and be able to use GitLab Duo Agentic Chat there.
The Minimal Access role on its own is not enough.
If the
duo_interactive_flow_authorizationfeature flag is disabled, you must have at least the Developer role for the GitLab Duo group instead. - If the subscription has a GitLab Duo add-on with seats, you must have an assigned seat. On GitLab.com, the subscription of the GitLab Duo group applies. On GitLab Self-Managed, the subscription of the instance applies.
To use GitLab Duo in Slack:
- Invite the app to a channel with
/invite @GitLab. - In the Slack channel or in a thread in the channel, type
@GitLabfollowed by your request (for example,@GitLab create an issue to track this bug). - The first time you type
@GitLab, GitLab sends you a private reply with a link to connect your GitLab account. Select the link, and follow the prompts to connect your Slack and GitLab accounts. - In Slack, type
@GitLabfollowed by your request again. - GitLab Duo acknowledges your request and starts working on the task.
- When the task is complete, GitLab Duo posts a threaded reply with the result.
When you connect your GitLab account:
- GitLab links your Slack identity to your own GitLab account.
- GitLab might ask you to let GitLab Duo read public Slack channels, so it can use conversation context in its answers.
- GitLab Duo acts on your behalf, using only your own GitLab and Slack permissions.
- GitLab does not share your data with other users in the channel.
If an error occurs, GitLab Duo reacts to your message with a locked padlock emoji and sends you a message with details about the issue. This message is visible only to you.
To leave feedback on this feature’s performance, use the thumbs up or thumbs down on any response.
GitLab Duo in Slack works in the following places:
- Public and private channels where the agent is a member of the channel. Mention
@GitLabto start. - Group direct messages that include the agent. Mention
@GitLabto start. - One-to-one direct messages with the agent, including when you open the agent from the Slack top bar.
GitLab Duo does not run in channels or direct messages shared with external organizations through Slack Connect. An answer in these conversations could show people outside your organization content that only you can access.
In direct messages, GitLab Duo uses the earlier messages in the conversation as context.
Direct messages require the assistant:write, im:history, and
mpim:history permissions. If the GitLab for Slack app
was installed before these permissions were added, you must
reinstall the app before GitLab Duo responds in these places.
GitLab for Slack app permissions
GitLab Duo requires the following additional GitLab for Slack app permissions:
| Scope | Purpose |
|---|---|
app_mentions:read | Receives events when users mention the bot in a channel. |
assistant:write | Marks the app as an agent that appears in the Slack top bar and shows a status while it works. |
channels:history | Reads conversation history in public channels to provide thread and channel context to the agent. |
groups:history | Reads conversation history in private channels to provide thread and channel context to the agent. |
im:history | Reads conversation history in direct messages with the agent. |
mpim:history | Reads conversation history in group direct messages that include the agent. |
reactions:write | Adds emoji reactions to messages to indicate agent lifecycle status. |
New installations receive the permissions that are available for your GitLab instance automatically.
The assistant:write, im:history, and mpim:history permissions are available only when the
slack_duo_agent_app feature flag is enabled. For more information, see the history.
Existing installations receive new permissions only after you
reinstall the GitLab for Slack app.
Slash commands
You can use slash commands to run common GitLab operations.
For the GitLab for Slack app:
- You must authorize your Slack user when you run your first slash command.
- You can replace
<project>with a project full path or create a project alias for slash commands.
If you use Mattermost slash commands instead:
- Replace
/gitlabwith the trigger name you’ve configured for these integrations. - Remove
<project>.
The following slash commands are available for GitLab:
| Command | Description |
|---|---|
/gitlab help | Shows all available slash commands. |
/gitlab <project> issue show <id> | Shows the issue with the ID <id>. |
/gitlab <project> issue new <title> Shift+Enter <description> | Creates an issue with the title <title> and description <description>. |
/gitlab <project> issue search <query> | Shows up to five issues that match <query>. |
/gitlab <project> issue move <id> to <project> | Moves the issue with the ID <id> to <project>. |
/gitlab <project> issue close <id> | Closes the issue with the ID <id>. |
/gitlab <project> issue comment <id> Shift+Enter <comment> | Adds a comment with the comment body <comment> to the issue with the ID <id>. |
/gitlab <project> deploy <from> to <to> | Deploys from the <from> environment to the <to> environment. |
/gitlab <project> run <job name> <arguments> | Executes the ChatOps job <job name> on the default branch. |
/gitlab incident declare | Opens a dialog to create an incident from Slack. |
deploy command
To deploy to an environment, GitLab tries to find a manual deployment action in the pipeline.
If only one deployment action is defined for an environment, that action is triggered. If more than one deployment action is defined, GitLab tries to find an action name that matches the environment name.
The command returns an error if GitLab cannot find a matching deployment action.
Create a project alias
In the GitLab for Slack app, slash commands use a project full path by default. You can use a project alias instead.
To create a project alias for slash commands in the GitLab for Slack app:
- In the top bar, select Search or go to and find your project.
- In the left sidebar, select Settings > Integrations.
- Select GitLab for Slack app.
- Next to the project path or alias, select Edit.
- Enter the new alias and select Save changes.
If an alias collision occurs in a Slack workspace (for example, multiple projects or groups attempt to use the same alias), GitLab automatically assigns a fallback alias in the following format:
- For projects:
p-<project_id>(for example,p-12345) - For groups:
g-<group_id>(for example,g-67890)
You can use these fallback aliases in slash commands when the preferred alias is unavailable.
Slack notifications
You can receive notifications to Slack channels for certain GitLab events.
Configure notifications
To configure Slack notifications:
In the top bar, select Search or go to and find your project.
In the left sidebar, select Settings > Integrations.
Select GitLab for Slack app.
In the Trigger section:
Select the checkbox for each GitLab event you want to receive notifications for in Slack.
For each checkbox you select, enter the names of the Slack channels you want to receive notifications. You can enter up to 10 channel names separated by commas (for example,
#channel-one, #channel-two).If the Slack channel is private, you must add the GitLab for Slack app to the channel.
Optional. In the Notification settings section:
Select the Notify only broken pipelines checkbox to receive notifications for failed pipelines only.
Select the Notify only when status changes checkbox to receive notifications only when the pipeline status for the ref changes.
From the Branches for which notifications are to be sent dropdown list, select the branches you want to receive notifications for.
Notifications are also sent for pipelines triggered by tags created from these branches.
Notifications for vulnerabilities are only triggered by the default branch, regardless of the selected branches. For more details, see issue 469373.
For Labels to be notified, enter any or all of the labels a GitLab issue, merge request, or comment must have to receive notifications for. Leave blank to receive notifications for all events.
Optional. Select Test settings.
Select Save changes.
Receive notifications to a private channel
To receive notifications to a private Slack channel, you must add the GitLab for Slack app to the channel:
- Mention the app in the channel by entering
@GitLab. - Select Add to Channel.
Notification events
The following GitLab events can trigger notifications in Slack:
| Event | Description |
|---|---|
| Push | A push is made to the repository. |
| Issue | A work item is created, closed, or reopened. |
| Confidential issue | A confidential work item is created, closed, or reopened. |
| Merge request | A merge request is created, merged, approved, closed, or reopened. |
| Note | A comment is added. |
| Confidential note | An internal note or comment on a confidential work item is added. |
| Tag push | A tag is pushed to the repository or removed. |
| Pipeline | A pipeline status changes. |
| Wiki page | A wiki page is created or updated. |
| Deployment | A deployment is started or finished. |
| Group mention in public | A group is mentioned in a public channel. |
| Group mention in private | A group is mentioned in a private channel. |
| Incident | An incident is created, closed, or reopened. |
| Vulnerability | A new, unique vulnerability is recorded on the default branch. |
| Alert | A new, unique alert is recorded. |
Trigger notifications for group mentions
To trigger a notification event for a group mention, use @<group_name> in:
- Issue and merge request descriptions
- Comments on issues, merge requests, and commits