Actions31
- Option Set Actions
- Public Query Actions
- Record Actions
- Role Actions
- Workflow Actions
- Worksheet Actions
Overview
This node interacts with the Hyper Application Platform (HAP) API to manage roles and their memberships. Specifically, the "Add Member" operation for the "Role" resource allows users to add members such as individual users, departments, department trees, jobs, or organization roles to a specified role within the HAP system.
Common scenarios include:
- Assigning multiple users or organizational units to a specific role to grant them permissions or responsibilities.
- Automating role membership updates based on organizational changes.
- Managing access control by dynamically adding members to roles in workflows.
For example, you might use this node to add several user IDs and department IDs to a "Manager" role after onboarding new team members.
Properties
| Name | Meaning |
|---|---|
| Role ID | The unique identifier of the role to which members will be added. |
| User IDs | An array of user IDs representing individual users to add as members of the role. |
| Department IDs | An array of department IDs representing departments to add as members of the role. |
| Department Tree IDs | An array of department tree IDs representing hierarchical department groups to add to the role. |
| Job IDs | An array of job position IDs to add as members of the role. |
| Organization Role IDs | An array of organization role IDs to add as members of the role. |
Output
The node outputs JSON data representing the result of the add member operation. This typically includes confirmation of the members added to the role or details about the updated role membership. The exact structure depends on the HAP API response but generally confirms success or failure and may list the affected members.
No binary data output is expected from this operation.
Dependencies
- Requires an API key credential for authenticating with the HAP API.
- The node expects the HAP API endpoint to be accessible and properly configured.
- No additional external dependencies beyond the HAP API and its authentication are required.
Troubleshooting
- Invalid Role ID: If the provided Role ID does not exist or is malformed, the API will likely return an error. Verify the Role ID before execution.
- Empty Member Arrays: Providing empty arrays for all member types may result in no action or an error. Ensure at least one member ID is supplied.
- Authentication Errors: Missing or invalid API credentials will cause authentication failures. Confirm that the API key credential is correctly set up.
- API Rate Limits: Excessive requests may trigger rate limiting; consider adding delays or batching operations.
- Malformed JSON Input: The user, department, job, or organization role IDs must be valid JSON arrays. Invalid JSON will cause parsing errors.
Links and References
- Hyper Application Platform (HAP) API Documentation (Replace with actual URL)
- n8n Documentation on Creating Custom Nodes
- General REST API best practices for managing roles and permissions