GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to send invitations to a specific GitLab project by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/invitations`. It is useful for automating the process of inviting users to collaborate on a project within GitLab, such as adding team members or external collaborators programmatically.

Use Case Examples

  1. Automatically invite new team members to a GitLab project when they are added to a company directory.
  2. Send invitations to external collaborators to join a GitLab project as part of a project onboarding workflow.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for testing or when authentication is handled externally.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method HTTP method to use for the request, defaulting to GET but POST is used for this operation.
Path Parameters Parameters included in the request path, specifically the project ID (`id`) to which the invitation is sent.

Output

JSON

  • id - The unique identifier of the invitation created.
  • email - The email address of the invited user.
  • access_level - The access level granted to the invited user in the project.
  • created_at - Timestamp when the invitation was created.
  • invited_by - Information about the user who sent the invitation.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID (`id`) path parameter is correctly provided and corresponds to an existing project in GitLab.
  • Verify that the API key credential used has sufficient permissions to invite users to the project.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include authentication failures (401 Unauthorized) if the API key is invalid or missing, and 404 Not Found if the project ID does not exist or the user lacks access.

Links

Discussion