Actions43
- Location Groups Actions
- Locations Actions
- Roles Actions
- User Groups Actions
- Users Actions
- Affiliate Entity Groups Actions
- Attachments Actions
- Classes Actions
- Contacts Actions
- Department Groups Actions
- Departments Actions
- Document Sequences Actions
- Earning Types Actions
- Email Templates Actions
- Employee Types Actions
- Employees Actions
- Entities Actions
- Exchange Rate Lines Actions
- Exchange Rate Types Actions
- Exchange Rates Actions
- Attachment Folders Actions
- Get Next Value Actions
Overview
This node enables creating a new role configuration within a company's system, specifically for the "Roles" resource and the "Create Company Config Role" operation. It is designed to define roles with specific permissions, user assignments, groups, and metadata in a structured way.
Common scenarios where this node is beneficial include:
- Automating the setup of user roles during company onboarding or restructuring.
- Managing access control by programmatically defining roles and their permissions.
- Integrating role management into broader workflows that require dynamic role creation based on external data.
For example, an HR automation workflow could use this node to create an "Employee" role with predefined permissions and assign it to users automatically when they join the company.
Properties
| Name | Meaning |
|---|---|
| Id | The unique identifier for the role being created (e.g., "Employee"). |
| Additional Body Fields | Optional additional fields to customize the role further: |
| - Key | A key representing the role. |
| - Href | URL reference for the role object. |
| - Description | Text description of the role's purpose or scope (e.g., "Full employee permissions including approvals"). |
| - Role Type | Specifies the type of role. Options: Enterprise, E Console, Multi Entity Distributed, Multi Entity Shared. |
| - Apply To | Defines which user access methods the role applies to. Options: Login And Slide In, Login Only, Slide In Only. |
| - Role Permission Assignments | JSON array describing permission assignments linked to the role, including keys, IDs, modules, names, access rights (list, readonly, add, modify, delete), and audit info. |
| - Role Users | JSON array mapping users assigned to this role, including keys, IDs, references, and audit information. |
| - Role Groups | JSON array mapping user groups assigned to this role, including keys, IDs, references, and audit information. |
| - Audit | JSON object containing audit metadata such as creation and modification timestamps and user identifiers. |
Output
The node outputs JSON data representing the newly created role object as returned by the API. This includes all properties sent in the request along with any additional metadata or identifiers generated by the backend system.
If the node supports binary data output, it would typically represent attachments or files related to the role, but based on the provided code and properties, this node focuses solely on JSON data.
Dependencies
- Requires an API key credential for authentication to the target service.
- The base URL for the API must be configured in the node credentials.
- Depends on the
@avantguardllc/n8n-openapi-nodepackage for building request properties from the OpenAPI specification. - The node sends HTTP requests with JSON payloads to the configured API endpoint.
Troubleshooting
- Missing Required Property "Id": The node requires the "Id" property to be set; omitting it will cause errors.
- Invalid JSON in Collection Fields: The properties like Role Permission Assignments, Role Users, Role Groups, and Audit expect valid JSON strings. Malformed JSON will cause parsing errors.
- API Authentication Errors: Ensure the API key credential is correctly configured and has sufficient permissions.
- Incorrect Role Type or Apply To Values: Use only the allowed options for these fields to avoid validation errors.
- Network or Endpoint Issues: Verify the base URL and network connectivity to the API server.
Links and References
- OpenAPI Specification Reference (bundled with the node)
- AvantGuard Sage Intacct API Documentation (hypothetical link for context)
- n8n Node Development Documentation