GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to create new users via the POST /api/v4/users endpoint. It is useful for automating user management tasks in GitLab, such as adding new team members or managing user accounts programmatically.

Use Case Examples

  1. Automatically create new GitLab users when onboarding employees.
  2. Integrate with HR systems to sync user accounts with GitLab.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
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 requests are sent.
Method The HTTP method to use for the request, defaulting to POST for creating users.
Parameter Schema Defines the schema for the parameters expected in the request body for creating a user.
Request Body Schema Defines the schema for the request body payload when creating a user.
Request Path The API endpoint path for creating users, fixed to /api/v4/users.

Output

JSON

  • id - The unique identifier of the created user.
  • username - The username of the created user.
  • email - The email address of the created user.
  • name - The full name of the created user.
  • state - The state of the user account (e.g., active, blocked).
  • created_at - Timestamp when the user was created.
  • web_url - URL to the user's profile page on GitLab.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the API key has sufficient permissions to create users in GitLab.
  • Verify the baseUrl is correct and accessible from the n8n instance.
  • Check that the request body conforms to the expected schema for creating users.
  • Common error: 401 Unauthorized - indicates authentication failure; verify API key and permissions.
  • Common error: 400 Bad Request - indicates invalid input data; check the request body for required fields and correct data types.

Links

Discussion