GitLab API

GitlabTool

Actions1000

Overview

This node operation allows uploading attachments to a specific group's wiki in GitLab via the GitLab API. It is useful for automating the process of adding files to group wikis, such as images or documents, directly from an n8n workflow. For example, a user can automate uploading a new image to a project wiki whenever a new file is added to a cloud storage folder.

Use Case Examples

  1. Uploading an image file to a GitLab group wiki attachment when a new file is added to a cloud storage service.
  2. Automating documentation updates by attaching files to group wikis in GitLab as part of a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API calls.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to be included in the request path, specifically the group ID for the wiki attachments endpoint.

Output

JSON

  • id - The ID of the uploaded attachment.
  • file_name - The name of the uploaded file.
  • url - The URL to access the uploaded attachment.
  • markdown - Markdown text to embed the attachment in wiki pages.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the group ID provided in the path parameters is correct and the authenticated user has permission to upload attachments to the group's wiki.
  • Verify that the base URL is correct and accessible, especially if using a self-hosted GitLab instance.
  • Check that the authentication credentials are valid and have the necessary API scopes for wiki attachment uploads.
  • Common error messages include 401 Unauthorized (authentication issues), 404 Not Found (invalid group ID or endpoint), and 400 Bad Request (invalid file or request format). Resolving these involves verifying credentials, permissions, and request parameters.

Links

Discussion