Actions11
Overview
This node extends GitLab API functionality by allowing users to interact with various GitLab resources, including pipelines. Specifically, for the Pipeline - Create operation, it enables creating a new pipeline in a specified GitLab project. This is useful for automating CI/CD workflows by programmatically triggering pipelines based on events or schedules within n8n.
Practical examples include:
- Automatically triggering a pipeline when new code is pushed to a repository.
- Creating pipelines for different branches or refs dynamically.
- Integrating pipeline creation into larger automation workflows that manage GitLab projects.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authenticating with GitLab: either using an Access Token or OAuth2 authentication. |
| Project Owner | The username or group name that owns the GitLab project where the pipeline will be created. |
| Project Name | The name of the GitLab repository/project in which to create the pipeline. |
| Ref | The Git reference (branch or tag) from which to run the pipeline. Defaults to "main". |
Output
The node outputs JSON data representing the created pipeline object as returned by the GitLab API. This typically includes details such as:
- Pipeline ID
- Status (e.g., pending, running, success)
- Reference branch or tag
- SHA commit hash
- Web URL to the pipeline in GitLab
- Creation and update timestamps
No binary data output is produced by this operation.
Dependencies
- Requires a valid GitLab API credential configured in n8n, either via an access token or OAuth2.
- The node uses internal helper functions to make authenticated HTTP requests to the GitLab API.
- The user must have appropriate permissions in the target GitLab project to create pipelines.
Troubleshooting
Common issues:
- Incorrect project owner or repository name causing 404 Not Found errors.
- Insufficient permissions leading to authorization errors.
- Invalid or expired authentication tokens.
- Specifying a non-existent ref (branch/tag) for the pipeline.
Error messages:
Unknown resource: pipeline— indicates the resource parameter was not set correctly.- HTTP 401 Unauthorized — check that the API credentials are valid and have required scopes.
- HTTP 404 Not Found — verify the project owner, repository name, and ref values.
Resolutions:
- Double-check all input parameters for typos or incorrect values.
- Ensure the API token or OAuth2 credential has pipeline creation rights.
- Confirm the ref exists in the repository before triggering the pipeline.