Actions66
- Branch Actions
- File Actions
- Group Actions
- Issue Actions
- Merge Request Actions
- Pipeline Actions
- Project Actions
- Raw API Actions
- Release Actions
- Tag Actions
Overview
This node operation allows you to create a note (comment) on a specific merge request in a GitLab project. It is useful for automating code review comments, adding feedback, or documenting discussions directly on merge requests within your CI/CD workflows.
Practical examples include:
- Automatically posting review comments when certain conditions are met during a pipeline.
- Adding notes to merge requests triggered by external events or integrations.
- Logging automated messages or reminders on merge requests.
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 GitLab. 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. |
| Merge Request IID | The internal ID (IID) of the merge request to which the note will be added. Must be a positive number. |
| Body | The text content of the note, e.g., "Looks good to me". Optional but typically required to add meaningful comments. |
Output
The node outputs an array of JSON objects representing the created note(s) on the merge request. Each object contains the details returned by the GitLab API for the note, such as its ID, body text, author information, creation timestamp, and related metadata.
If binary data were involved (not applicable here), it would be summarized accordingly, but this operation deals solely with JSON data.
Dependencies
- Requires access to a GitLab instance, either the public gitlab.com or a self-hosted GitLab server.
- Requires an API access token with appropriate permissions to read and write notes on merge requests.
- The node supports two authentication modes: using stored credentials or providing custom connection parameters including server URL and access token.
- No additional external dependencies beyond the GitLab API and n8n's HTTP request capabilities.
Troubleshooting
- Invalid or missing Merge Request IID: The node requires a valid positive integer for the merge request IID. Ensure this value corresponds to an existing merge request in the target project.
- Authentication errors: If using custom authentication, verify that the access token has sufficient permissions and the server URL is correct.
- Empty note body: While the "Body" property is optional, submitting an empty note may result in an error or no visible comment. Provide meaningful text to avoid issues.
- Project identification issues: When using custom authentication, if both Project ID and Project Owner/Name are omitted or incorrect, the API call will fail. Prefer specifying the numeric Project ID.
- API rate limits or network errors: Standard GitLab API limitations apply; ensure network connectivity and token scopes are adequate.
Common error messages usually relate to invalid parameters or authentication failures and can be resolved by verifying input values and credentials.