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 - Get operation, this node retrieves detailed information about a specific branch in a GitLab project.

This operation is useful when you want to:

  • Fetch metadata about a branch such as its commit details, protection status, or other attributes.
  • Automate workflows that depend on branch information, e.g., triggering actions based on branch existence or state.
  • Integrate GitLab branch data into other systems or reports.

Practical example:
You might use this node to get the latest commit SHA of a feature branch before deploying code or to check if a branch is protected before attempting to delete it.


Properties

Name Meaning
Authentication Choose between using saved credentials ("Credential") or specifying custom connection details ("Custom").
GitLab Server Base URL of your GitLab instance (e.g., https://gitlab.com). Used only if "Custom" authentication is selected.
Access Token Personal access token with API permissions. Used only if "Custom" authentication is selected.
Project Owner Namespace or owner of the project. Ignored if "Project ID" is set. Used only if "Custom" authentication is selected.
Project Name Project slug or name. Ignored if "Project ID" is set. Used only if "Custom" authentication is selected.
Project ID Numeric project ID. Takes precedence over owner and name if provided. Used only if "Custom" authentication is selected.
Branch The name of the branch to retrieve information about. Example: feature/login. (Required)

Output

The output is a JSON object representing the branch details retrieved from the GitLab API. This typically includes:

  • Branch name
  • Commit information (SHA, author, date, message)
  • Protection status and related settings
  • Other metadata associated with the branch

The output is structured as an array of JSON objects, each corresponding to one input item processed by the node.

No binary data is output by this operation.


Dependencies

  • Requires access to a GitLab instance, either the public https://gitlab.com or a self-hosted GitLab server.
  • Requires an API access token with appropriate permissions to read project branches.
  • If using saved credentials, the node expects a configured API key credential in n8n.
  • If using custom authentication, the user must provide the GitLab server URL, access token, and project identification parameters.

Troubleshooting

  • Invalid or missing project identification:
    If neither a valid project ID nor both project owner and project name are provided, the node may fail to locate the project. Ensure these fields are correctly set.

  • Authentication errors:
    Using an invalid or expired access token will cause authorization failures. Verify the token has sufficient API scope and is active.

  • Branch not found:
    If the specified branch does not exist in the project, the API will return an error. Double-check the branch name spelling and project context.

  • API rate limits:
    Frequent requests may hit GitLab API rate limits, causing temporary failures. Implement retry logic or reduce request frequency.

  • Malformed inputs:
    Providing incorrect types (e.g., non-numeric project ID) or empty required fields will cause validation errors.


Links and References

Discussion