Actions18
- Branch Actions
- File Actions
- Issue Actions
- Merge Request Actions
- Pipeline Actions
- Raw API Actions
Overview
This node provides extended integration with GitLab, allowing users to interact with various GitLab resources such as branches, files, issues, merge requests, pipelines, and also supports making raw API requests. The "Raw API" resource with the "Request" operation enables users to make arbitrary HTTP requests to any GitLab API endpoint, offering maximum flexibility for custom or unsupported API calls.
Common scenarios where this node is beneficial include:
- Automating GitLab workflows by creating or managing branches, issues, merge requests, and pipelines.
- Fetching detailed information about GitLab entities.
- Executing custom API calls that are not covered by predefined operations, such as accessing new or less common GitLab API endpoints.
- Integrating GitLab data into broader automation workflows in n8n.
Practical example:
- Use the Raw API Request operation to send a POST request to
/projects/123/issueswith a JSON body to create a new issue with custom fields. - Use a GET request to
/projects/123/repository/commitswith query parameters to list commits on a specific branch.
Properties
| Name | Meaning |
|---|---|
| HTTP Method | HTTP method to use for the request. Options: DELETE, GET, PATCH, POST, PUT |
| Endpoint | The API endpoint path to call, e.g., /projects/1/issues. Must start with a slash /. |
| Body Parameters | JSON object representing the request body payload. Used only for POST, PUT, PATCH methods. |
| Query Parameters | JSON object representing query parameters to append to the URL, e.g., {"state":"opened"}. |
Output
The node outputs an array of JSON objects corresponding to the response from the GitLab API call made. Each item in the output contains the parsed JSON response data under the json property.
If multiple items are returned (e.g., when fetching lists), each item corresponds to one element from the API response array.
The node does not explicitly handle binary data output for the Raw API Request operation; it focuses on JSON responses.
Dependencies
- Requires an API authentication credential configured in n8n to connect to GitLab. This typically involves providing an API key or token with appropriate permissions.
- The node uses internal helper functions to perform authenticated HTTP requests to GitLab's REST API.
- No additional external dependencies beyond the configured GitLab API credentials.
Troubleshooting
- Invalid Endpoint Path: Ensure the endpoint starts with a slash
/and is a valid GitLab API path. - Authentication Errors: If the request fails due to authentication, verify that the API token or credentials have sufficient permissions and are correctly configured in n8n.
- Malformed JSON in Body or Query Parameters: The Body Parameters and Query Parameters must be valid JSON. Invalid JSON will cause errors.
- Unsupported HTTP Methods: Only standard HTTP methods DELETE, GET, PATCH, POST, and PUT are supported.
- API Rate Limits: GitLab may enforce rate limits; if you encounter rate limit errors, consider adding delays or reducing request frequency.
- Error Responses from GitLab: The node will throw errors if the GitLab API returns error status codes. Check the error message for details and adjust the request accordingly.