Actions52
- ApiKeys Actions
- Auth Actions
- Identities Actions
- Members Actions
- Messages Actions
- Platform Logs Actions
- Platforms Actions
- Projects Actions
- Webhooks Actions
Overview
This node operation updates the role of a member within a specified project. It is useful in scenarios where you need to change user permissions or roles dynamically, such as promoting a member to admin, demoting an admin to a viewer, or adjusting access levels based on project needs.
Practical examples:
- Changing a team member's role from "member" to "admin" after they take on more responsibilities.
- Restricting access by changing a user's role to "viewer".
- Managing project members' roles programmatically during onboarding or offboarding processes.
Properties
| Name | Meaning |
|---|---|
| User ID of the member to update (userId) | The unique identifier of the user whose role you want to update. |
| New role to assign (role) | The new role to assign to the member. Options: admin, member, viewer. |
| Project | The identifier of the project where the member belongs and the update will be applied. |
Output
The output JSON contains the response from the API after updating the member's role. This typically includes confirmation of the update and the updated member details such as user ID, assigned role, and project association.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential configured in n8n for authentication with the messaging gateway API.
- The node sends a PATCH HTTP request to the endpoint
/api/v1/projects/{project}/members/{userId}to perform the update. - The
projectanduserIdparameters must be correctly set to target the right member in the right project.
Troubleshooting
Common issues:
- Incorrect or missing
userIdorprojectvalues will cause the API call to fail. - Assigning a role not in the allowed list (
admin,member,viewer) will result in validation errors. - Insufficient permissions of the API key may prevent updating member roles.
- Incorrect or missing
Error messages:
- 404 Not Found: The specified user or project does not exist. Verify the
userIdandproject. - 403 Forbidden: The API key lacks permission to update member roles. Check API key scopes.
- 400 Bad Request: Invalid role value or malformed request. Ensure role is one of the allowed options.
- 404 Not Found: The specified user or project does not exist. Verify the
Links and References
- API Documentation for Members Update (example placeholder link)
- Managing Project Members (example placeholder link)