Actions31
- Option Set Actions
- Public Query Actions
- Record Actions
- Role Actions
- Workflow Actions
- Worksheet Actions
Role → Remove Member
AI-generatedOverview
This node interacts with the HAP (Hyper Application Platform) API to manage roles and their members. Specifically, the "Remove Member" operation under the "Role" resource allows users to remove specified members from a given role. This is useful in scenarios where you need to update role memberships dynamically, such as revoking access or reorganizing team structures.
Practical examples include:
- Removing one or more users from a role after they leave a project.
- Removing entire departments or organizational units from a role when restructuring teams.
- Cleaning up job or organization role assignments by removing outdated members.
Properties
| Name | Meaning |
|---|---|
| Role ID | The unique identifier of the role from which members will be removed. |
| User IDs | An array of user IDs specifying individual users to remove from the role. |
| Department IDs | An array of department IDs specifying departments whose members should be removed from the role. |
| Department Tree IDs | An array of department tree IDs specifying hierarchical department groups to remove. |
| Job IDs | An array of job position IDs specifying jobs whose holders should be removed from the role. |
| Organization Role IDs | An array of organization role IDs specifying other roles whose members should be removed. |
Output
The node outputs JSON data representing the result of the removal operation. Typically, this includes confirmation of successful removals or details about any failures. The exact structure depends on the API response but generally contains status information and possibly updated role membership data.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the HAP API.
- The node expects proper configuration of the HAP API credentials within n8n.
- Network connectivity to the HAP API endpoint is necessary.
Troubleshooting
Common Issues:
- Providing invalid or empty Role ID will cause the operation to fail.
- Supplying malformed JSON arrays for userIds, departmentIds, etc., may lead to errors.
- Attempting to remove members who are not part of the role might return warnings or no changes.
- Insufficient permissions or invalid API credentials will result in authentication errors.
Error Messages:
- "Role ID is required" — Ensure the Role ID property is set.
- "Invalid user IDs format" — Verify that the User IDs input is a valid JSON array.
- "Authentication failed" — Check that the API key credential is correctly configured and valid.
- "Member not found in role" — Indicates trying to remove a member who is not assigned to the role; verify member existence.
Resolving these typically involves validating inputs, checking API credentials, and ensuring the targeted members exist in the specified role.
Links and References
- HAP API Documentation (example placeholder link)
- n8n Documentation on Creating Custom Nodes
- General JSON formatting guide for input properties: https://www.json.org/json-en.html