GitLab Extended icon

GitLab Extended

Extended GitLab node

Overview

This node enables interaction with GitLab repositories, specifically allowing users to delete files from a GitLab project repository. It supports both credential-based and custom authentication methods, making it flexible for different GitLab instances including self-hosted servers.

Typical use cases include:

  • Automating cleanup of obsolete or unwanted files in a GitLab repository.
  • Integrating file deletion into CI/CD pipelines or other automated workflows.
  • Managing repository contents programmatically without manual intervention.

For example, you could configure this node to delete a configuration file from the main branch after a deployment completes, ensuring that sensitive data is removed automatically.

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 for authentication. 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.
Path Required. Path to the file in the repository to delete, e.g., src/index.ts.
Branch Required. Branch to commit the deletion to, e.g., main.
Commit Message Required. Commit message describing the deletion action.

Output

The node outputs JSON data representing the result of the file deletion operation as returned by the GitLab API. This typically includes metadata about the commit created by the deletion, such as commit ID, author, timestamp, and confirmation of the file removal.

No binary data output is produced by this operation.

Dependencies

  • Requires an API authentication token with appropriate permissions to modify the target GitLab repository.
  • Supports either stored credentials configured in n8n or custom authentication parameters entered directly in the node.
  • The node interacts with the GitLab REST API; network connectivity to the GitLab server is required.

Troubleshooting

  • Invalid or missing authentication: Ensure that the access token has sufficient permissions to delete files in the specified project and branch.
  • Incorrect project identification: If both Project ID and Project Owner/Name are provided, Project ID takes precedence. Verify that the correct project identifier is used.
  • File path errors: The specified file path must exist on the given branch. Deleting a non-existent file will cause an error.
  • Branch does not exist: Confirm that the branch specified exists in the repository.
  • Commit message missing: The commit message is required; leaving it empty will cause the node to throw an error.
  • API rate limits or permission issues: Check GitLab API rate limits and user permissions if requests fail unexpectedly.

Common error messages usually relate to authorization failures, invalid parameters, or resource not found errors. Reviewing the exact error response from GitLab can help pinpoint the issue.

Links and References

Discussion