Actions66
- Branch Actions
- File Actions
- Group Actions
- Issue Actions
- Merge Request Actions
- Pipeline Actions
- Project Actions
- Raw API Actions
- Release Actions
- Tag Actions
Overview
The node "GitLab Extended" provides extended integration with GitLab, allowing users to interact with various GitLab resources such as files, branches, pipelines, tags, releases, groups, projects, issues, merge requests, and raw API endpoints. Specifically for the File - Get operation, this node fetches the content or metadata of a file from a GitLab repository at a specified path and reference (branch, tag, or commit SHA).
This node is beneficial in scenarios where automation workflows need to retrieve source code files, configuration files, or any repository files dynamically from GitLab. For example, it can be used to:
- Automatically fetch a configuration file from a specific branch before running deployment scripts.
- Retrieve documentation files from a release tag to generate reports.
- Access source code files for analysis or processing in an automated pipeline.
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. |
| Ref | Reference such as a branch name or commit SHA to get the file from, e.g., main. Required. |
| Path | Path to the file in the repository, e.g., src/index.ts. Required. |
| Reference (fileRef) | Reference such as a branch or commit SHA for file operations like get or list. Defaults to main. |
Output
The output of the File - Get operation is a JSON object representing the file's data retrieved from the GitLab repository. This typically includes:
- File metadata such as file name, path, size, encoding, and last commit information.
- The file content encoded in base64 or plain text depending on the API response.
If the file content is binary, it may be included in the output as base64-encoded data within the JSON structure.
Dependencies
- Requires access to a GitLab instance, either the public
https://gitlab.comor a self-hosted GitLab server. - Requires an API access token with appropriate permissions to read repository files.
- Supports two authentication modes:
- Using saved credentials configured in n8n.
- Custom authentication by providing server URL, access token, and project identification parameters directly in the node.
Troubleshooting
- Invalid Project Identification: If both Project ID and Project Owner/Name are missing or incorrect, the node will fail to locate the project. Ensure that either a valid numeric Project ID or correct owner and project name are provided.
- Authentication Errors: If the access token is invalid or lacks required permissions, API calls will fail. Verify the token scope includes repository read access.
- File Not Found: If the specified file path or reference does not exist, the node will return an error. Double-check the file path and branch/tag/commit reference.
- Invalid JSON in Parameters: Some parameters accept JSON input (not applicable for File Get but relevant for other operations). Invalid JSON will cause errors.
- Rate Limits: GitLab API rate limits may affect large batch operations; consider enabling pagination or limiting results.
Links and References
- GitLab API Documentation - Repository Files
- GitLab Personal Access Tokens
- n8n Documentation - Creating Custom Nodes
This summary focuses on the File - Get operation of the GitLab Extended node based on the provided properties and source code analysis.