Actions11
Overview
This node provides extended integration with GitLab, allowing users to interact with various GitLab resources such as branches, pipelines, files, issues, and raw API endpoints. It supports common operations like creating, retrieving, and listing these resources. This node is beneficial for automating GitLab workflows directly within n8n, such as managing branches, triggering pipelines, handling project files, or creating issues programmatically.
Practical examples include:
- Creating a new branch in a repository automatically when a certain event occurs.
- Retrieving details of a specific pipeline to monitor CI/CD status.
- Listing files in a repository folder to process or analyze them.
- Creating an issue in a project based on external bug reports.
- Making custom API requests to GitLab’s REST API for unsupported operations.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication: either "Access Token" or "OAuth2". |
| Project Owner | The username or group name that owns the GitLab project (URL-encoded internally). |
| Project Name | The name of the GitLab repository/project. |
| Resource | The type of GitLab resource to operate on: Branch, File, Issue, Pipeline, or Raw API. |
| Operation | The action to perform on the selected resource. Options vary by resource, e.g., Create, Get, List, Request. |
| Branch Name | Name of the branch (used for branch create/get operations). |
| Ref | Reference branch or commit SHA used when creating a branch or pipeline. |
| Pipeline ID | Identifier of a pipeline (used for getting a specific pipeline). |
| Return All | Whether to return all results or limit the number of returned items (for list/getAll ops). |
| Limit | Maximum number of results to return if not returning all (for list/getAll ops). |
| Pipeline Ref | Reference branch or commit SHA used when creating a pipeline. |
| File Path | Path to the file in the repository (used for file get/list operations). |
| Reference (fileRef) | Git reference (branch, tag, or commit SHA) for file operations. |
| Title | Title of the issue (used when creating an issue). |
| Description | Description text of the issue (optional, used when creating an issue). |
| Issue Number | Number of the issue to retrieve (used for getting an issue). |
| HTTP Method | HTTP method for raw API requests: DELETE, GET, PATCH, POST, PUT. |
| Endpoint | API endpoint path for raw API requests. |
| Body Parameters | JSON body content for raw API requests (POST, PUT, PATCH). |
| Query Parameters | JSON query parameters for raw API requests. |
Output
The node outputs an array of JSON objects representing the data returned from GitLab API calls corresponding to the requested operation. Each item corresponds to one input item processed.
- For "get" operations, the output contains the detailed object of the requested resource (e.g., branch details, pipeline info, file metadata, issue data).
- For "getAll" or "list" operations, the output is an array of objects representing multiple resources.
- For "create" operations, the output contains the newly created resource's details.
- For raw API requests, the output reflects the response from the specified GitLab endpoint.
No binary data output is produced by this node.
Dependencies
- Requires a valid GitLab API authentication credential, either via an access token or OAuth2.
- Uses internal helper functions to make authenticated HTTP requests to GitLab’s REST API.
- No additional external dependencies beyond standard n8n credentials and HTTP request capabilities.
Troubleshooting
Common Issues:
- Incorrect project owner or repository name can cause "Not Found" errors; ensure correct URL-encoded values.
- Insufficient permissions for the provided API token may result in authorization errors.
- Using invalid branch names or references can cause failures when creating branches or pipelines.
- Exceeding API rate limits may cause request failures; consider adding delays or retries.
Error Messages:
Unknown resource: Occurs if an unsupported resource value is provided; verify the resource parameter.- API errors from GitLab (e.g., 404, 401) will be propagated; check credentials and resource identifiers.
- JSON parsing errors in raw API requests if body or query parameters are malformed.