GitLab API

GitlabTool

Actions1000

Overview

This node operation allows uploading attachments to a specific project's wiki in GitLab via the GitLab API. It is useful for automating the process of adding files to project wikis, such as images or documents, directly from an n8n workflow.

Use Case Examples

  1. Uploading an image file to a project's wiki to enhance documentation.
  2. Adding a PDF attachment to a project wiki page for sharing detailed reports.

Properties

Name Meaning
Skip Authentication Option to bypass authentication for the request.
Authentication Type of authentication used for the request, typically GitLab API key.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters to specify the project ID in the API path.

Output

JSON

  • attachment_url - URL of the uploaded attachment in the project wiki.
  • alt - Alternative text for the attachment, if provided.
  • markdown - Markdown string to embed the attachment in wiki pages.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID is correctly specified in the path parameters to avoid 404 errors.
  • Verify that the authentication token has sufficient permissions to upload attachments to the project's wiki.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include authentication failures, permission denied, or invalid project ID, which can be resolved by verifying credentials and input parameters.

Links

Discussion