Actions26
Overview
The "Add Member" operation in the GateKit node allows you to add a new user as a member to a specific project. This is useful for managing project access and permissions by inviting users via their email addresses and assigning them roles such as owner, admin, member, or viewer.
Typical use cases include:
- Automating team management workflows by programmatically adding members to projects.
- Integrating with onboarding systems to grant new users access to projects automatically.
- Managing user roles dynamically based on external triggers or events.
For example, you could use this node to add a new team member with an "admin" role to a project identified by its slug, enabling them to manage project settings and resources.
Properties
| Name | Meaning |
|---|---|
| Email of user to add | The email address of the user to be added as a member to the project. |
| Role to assign to member | The role assigned to the new member. Options: owner, admin, member, viewer. |
| Slug | The unique identifier (slug) of the project to which the member will be added. |
Output
The node outputs the JSON response from the API after attempting to add the member. This typically includes details about the newly added member or an error message if the operation failed.
The output is structured as a JSON object representing the member resource returned by the API. It may contain fields such as user ID, email, assigned role, and timestamps related to membership.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential configured in n8n to authenticate requests to the GateKit API.
- The node sends a POST request to the endpoint
/api/v1/projects/:slug/memberswith query parameters foremailandrole. - The
slugparameter must correspond to an existing project identifier in the GateKit system.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Providing an incorrect or non-existent project slug will result in a "not found" error.
- Using an invalid email format or an email that already belongs to a member may cause the API to reject the request.
- Assigning a role outside the allowed options (
owner,admin,member,viewer) will cause validation errors.
Error messages:
- 401 Unauthorized: Check that your API key credential is correctly set up and has sufficient permissions.
- 404 Not Found: Verify that the project slug exists and is spelled correctly.
- 400 Bad Request: Ensure all required fields are provided and valid, especially the email and role.
- 409 Conflict: The user might already be a member; check existing members before adding.
Resolving these usually involves verifying input values, ensuring correct API credentials, and confirming project existence.
Links and References
- GateKit API Documentation (for detailed API endpoints and parameters)
- n8n Documentation (for general usage of HTTP request nodes and credential setup)