Triggers
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
Version history
- Introduced in GitLab 18.3 with a feature flag named
ai_flow_triggers. Enabled by default. - Changed in GitLab 18.8 to require an additional flag named
ai_catalog_create_third_party_flows. Disabled by default. - Generally available in GitLab 18.8.
[!flag] To change the location of your flow configuration file, you must enable a feature flag. For more information, see the history.
A trigger determines when a flow or external agent runs. A trigger cannot be created for a custom agent or foundational agent.
For example, you can specify flows to be triggered when you mention them in a discussion, or when you assign them as a reviewer.
Create a trigger
Version history
- Assign and Assign reviewer event types introduced in GitLab 18.5.
- Pipeline events trigger event type introduced in GitLab 18.9 as an experiment with a flag named
ai_flow_trigger_pipeline_hooks. Disabled by default. - Merge request ready trigger event type introduced in GitLab 19.0 with a flag named
merge_request_ready_flow_trigger. Disabled by default. - Merge request code conflict trigger event type introduced in GitLab 19.1.
- Merge request trigger event type with the Approved action introduced in GitLab 19.1.
- Feature flag
ai_flow_trigger_pipeline_hooksremoved in GitLab 19.1. - Work item created trigger event type introduced in GitLab 19.1.
- Merge request ready trigger event type generally available in GitLab 19.1. Feature flag
merge_request_ready_flow_triggerremoved. - Work item status changed trigger event type introduced in GitLab 19.2.
- Merge request ready and Merge request code conflict event types consolidated into the Merge request event type as the Marked ready and Merge conflict actions in GitLab 19.2.
[!flag] The availability of this feature is controlled by a feature flag. For more information, see the history.
Prerequisites:
- You must have the Maintainer or Owner role for the project.
To create a trigger:
- In the top bar, select Search or go to and find your project.
- In the left sidebar, select AI > Triggers.
- Select New flow trigger.
- In Description, enter a description for the trigger.
- From the Event types dropdown list, select:
- One or more trigger event types.
- If needed for the trigger event type, a trigger event action.
- From the Service account dropdown list, select a user to be the composite identity.
- For Configuration source, select one of the following:
- AI Catalog: From the flows configured for this project, select a flow for the trigger to execute.
- Configuration path: Enter the path to the flow configuration file
(for example,
.gitlab/duo/flows/claude.yaml). To view this option, theai_catalog_create_third_party_flowsflag must be enabled.
- Select Create flow trigger.
The trigger now appears in AI > Triggers.
Trigger event types
| Name | Description | Configuration |
|---|---|---|
| Mention | When the service account user is mentioned in a comment on an issue or merge request. | None |
| Assign | When the service account user is assigned to an issue or merge request. | None |
| Assign reviewer | When the service account user is assigned as a reviewer to a merge request. | None |
| Pipeline events | When a pipeline changes state. | From the Trigger when dropdown list, select one or more of the following: - Running - Passed - Failed - Canceled |
| Merge request | When a selected merge request action occurs. | From the Trigger when dropdown list, select one of the following: - Approved: When a merge request has all required approvals - Marked ready: When a draft merge request is marked as ready for review - Merge conflict: When a merge request can no longer be merged due to a code conflict |
| Work item | When a selected work item action occurs. | From the Trigger when dropdown list, select one of the following: - Created: When a work item is created - Status changed: When a work item's status changes |
Edit a trigger
- In the top bar, select Search or go to and find your project.
- In the left sidebar, select AI > Triggers.
- For the trigger you want to change, select Edit flow trigger ({pencil}).
- Make the changes and select Save changes.
Delete a trigger
- In the top bar, select Search or go to and find your project.
- In the left sidebar, select AI > Triggers.
- For the trigger you want to change, select Delete flow trigger ({remove}).
- On the confirmation dialog, select OK.