Actions37
- Groups Actions
- Members Actions
- Roles Actions
- Permissions Actions
- Jobs Actions
- Shares Actions
- Actions Actions
- Users Actions
Overview
This node operation allows you to create a new iTwin role within an iTwin project. Roles define sets of permissions and access controls for users interacting with the iTwin platform. Creating custom roles is useful when you want to tailor access rights specifically to your organization's needs, such as defining roles for project managers, engineers, or external collaborators.
Practical examples include:
- Automating the creation of project-specific roles during onboarding.
- Integrating role management into CI/CD pipelines for infrastructure projects.
- Dynamically generating roles based on external HR or project management systems.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the iTwin where the role will be created. |
| Display Name | The display name of the role to be created (e.g., "Project Engineer", "Viewer"). |
| Description | A textual description explaining the purpose or scope of the role. |
| Options | Additional options including: |
| - Custom Payload | Allows overriding the default request body with a custom JSON payload for advanced use. |
Output
The output is a JSON object representing the newly created iTwin role. This typically includes details such as the role's ID, display name, description, and any other metadata returned by the API after successful creation.
No binary data output is involved in this operation.
Dependencies
- Requires an API authentication token credential configured in n8n to authorize requests against the iTwin platform.
- Depends on the iTwin Users & Access Control API endpoint that handles role creation.
- No additional external services are explicitly required beyond the iTwin API.
Troubleshooting
Common issues:
- Missing or invalid iTwin ID can cause the API to reject the request.
- Insufficient permissions of the API key or user may result in authorization errors.
- Malformed custom JSON payloads (if used) can lead to request failures.
Error messages:
"Unknown operation": Indicates the specified operation is not recognized; ensure "create-iTwin-role" is selected.- API errors related to validation or authorization will be passed through; check the error message for details.
Resolutions:
- Verify all required fields (ID, Display Name, Description) are correctly filled.
- Confirm the API credentials have sufficient privileges to create roles.
- If using custom payload, validate JSON syntax before sending.
Links and References
- iTwin Developer Documentation
- Refer to the official iTwin API docs for detailed schema and role management guidelines.