GitLab Extended icon

GitLab Extended

Extended GitLab node

Overview

The node "GitLab Extended" provides extended integration with GitLab, allowing users to manage various GitLab resources programmatically within n8n workflows. Specifically, for the Branch - Create operation, it enables creating a new branch in a GitLab project based on an existing branch or commit reference.

This operation is useful when automating development workflows such as:

  • Creating feature branches automatically from the main branch.
  • Automating release branch creation.
  • Managing branches dynamically based on events or triggers in your CI/CD pipeline.

For example, you can use this node to create a new branch named feature/login from the main branch whenever a new feature request is received.

Properties

Name Meaning
Authentication Choose how to authenticate: either use saved credentials ("Credential") or provide custom connection details ("Custom").
GitLab Server Base URL of your GitLab instance (e.g., https://gitlab.com). Only shown if using Custom authentication. Defaults to https://gitlab.com.
Access Token Personal access token with API permissions for GitLab. Only shown if using Custom authentication.
Project Owner Namespace or owner of the project. Ignored if Project ID is set. Only shown if using Custom authentication.
Project Name Project slug or name. Ignored if Project ID is set. Only shown if using Custom authentication.
Project ID Numeric project ID. Takes precedence over owner and name if provided. Only shown if using Custom authentication.
Branch (Required) Name of the new branch to create, e.g., feature/login.
Ref (Required) Existing branch or commit SHA to create the new branch from, e.g., main or a commit SHA. Defaults to main.

Output

The node outputs JSON data representing the newly created branch's details as returned by the GitLab API. This typically includes information such as:

  • Branch name
  • Commit details the branch points to
  • Protection status
  • Other metadata related to the branch

No binary data output is involved in this operation.

Dependencies

  • Requires access to a GitLab instance, either the public GitLab server (https://gitlab.com) or a self-hosted GitLab server.
  • Requires an API access token with appropriate permissions to read project info and create branches.
  • The node supports two authentication modes:
    • Using saved credentials configured in n8n.
    • Providing custom connection parameters including server URL and personal access token.

Troubleshooting

  • Invalid or missing project identification: If neither a valid Project ID nor both Project Owner and Project Name are provided (when using custom authentication), the node may fail to locate the target project. Ensure these fields are correctly set.
  • Insufficient permissions: The access token must have API rights to create branches. Errors indicating permission denied usually mean the token lacks required scopes.
  • Branch already exists: Attempting to create a branch that already exists will result in an error from GitLab. Verify branch names before creation.
  • Invalid ref: The ref parameter must be a valid existing branch name or commit SHA. Using an invalid ref will cause the API call to fail.
  • Network or server errors: Check connectivity to the GitLab server URL and ensure the server is reachable.

Links and References

Discussion