GitLab Trigger icon

GitLab Trigger

Starts the workflow when GitLab sends a webhook event

GitLab Trigger

AI-generated

Summary

Register GitLab webhooks on specified projects to trigger the workflow on configured GitLab events and emit webhook event payloads as workflow input when GitLab calls the webhook.

Inputs

  • Authentication — Choose to authenticate using saved credentials or specify a custom GitLab server URL and personal access token.
  • GitLab Server — Base URL of the GitLab instance; used only if Custom authentication is selected.
  • Access Token — Personal access token with API permissions; used only if Custom authentication is selected.
  • Project Scope (required) — Select which GitLab projects to register the webhook on: Single Project, My Projects (membership), Multiple Project IDs, or All Accessible Projects.
  • Project Locator — When using Single Project scope, choose whether to identify the project by its numeric ID or by namespace/path.
  • Project ID — Numeric project ID for Single Project scope when Project Locator is ID.
  • Project Owner — Project namespace or owner for Single Project scope when Project Locator is Path.
  • Project Name — Project slug or name for Single Project scope when Project Locator is Path.
  • Project IDs — Comma or whitespace-separated numeric project IDs for Multiple Project IDs scope.
  • Events (required) — One or more GitLab webhook events to listen for (e.g., push, issues, merge requests); these events will trigger the workflow.
  • Secret Token — Optional secret token that GitLab must send as the X-Gitlab-Token header for webhook requests to be accepted.
  • Enable SSL Verification — Toggle to enable or disable SSL certificate verification for the webhook URL on GitLab's side.

Output shape

The operation outputs webhook event payloads as JSON in the first output when triggered by GitLab webhook calls.

The node creates, checks, and deletes webhooks on the selected GitLab projects that call n8n's webhook URL. Incoming webhook HTTP POST requests trigger the workflow, providing GitLab event data as input in JSON format. If a secret token is set, incoming requests must include matching 'X-Gitlab-Token' headers. Multiple projects result in multiple webhooks managed internally. No input data is consumed; the node functions as an event source.

Examples

Example 1: Trigger workflow on push events for a single GitLab project by project ID.

Authentication set to Credential (or Custom with server URL and token), Project Scope set to Single Project, Project Locator set to ID, and Project ID provided. Events include 'push_events'.

Example 2: Trigger workflow on merge request events across all accessible projects.

Authentication chosen as Credential or Custom. Project Scope set to All Accessible Projects. Events include 'merge_requests_events'. The node creates webhooks for all projects the token can access.

Links

Discussion