Actions40
- Role Actions
- Page Actions
- Chapter Actions
- Book Actions
- Shelf Actions
- User Actions
- Attachment Actions
- Tag Actions
Overview
This node integrates with the BookStack API to manage various resources such as books, pages, chapters, shelves, users, roles, attachments, and tags. Specifically for the Role - Create operation, it allows users to create a new role within the BookStack system.
The node supports two modes of operation:
- Automatic mode: The user provides a natural language description of the desired action (e.g., "Create a new role for editors"), and the node attempts to parse this description to determine the resource and operation automatically.
- Manual mode: The user explicitly selects the resource ("Role") and operation ("Create") and provides the necessary input properties.
This node is beneficial in scenarios where you want to automate content or permission management in BookStack, such as programmatically creating roles to assign specific permissions to users or groups.
Practical example
- Automatically create a new role by describing the request: "Create a new role called 'Editor' with permissions to edit pages."
- Manually create a role by selecting the "Role" resource and "Create" operation, then providing the role name and other details.
Properties
| Name | Meaning |
|---|---|
| Tool Description | Choose how to determine the resource and operation: - Set Automatically - Set Manually |
| Request Description | (Shown only if "Set Automatically" is selected) Describe your request in natural language, e.g., "Create a new page about API documentation". The system uses this to infer the resource and operation. |
Note: For the Role - Create operation specifically, no additional input properties are defined in the provided snippet beyond these general ones. This suggests that either minimal data is required to create a role or that further manual inputs would be added in the full implementation.
Output
The node outputs an array of JSON objects corresponding to each input item processed. Each output object contains the response from the BookStack API for the create role request under the json field.
Example structure of one output item:
{
"json": {
// Response data from BookStack API about the created role
},
"pairedItem": {
"item": 0
}
}
No binary data output is indicated in the source code.
Dependencies
- Requires an API key credential for authenticating with the BookStack API.
- The base URL and tokens for the BookStack instance must be configured in the node credentials.
- The node uses HTTP requests to communicate with the BookStack REST API endpoints.
Troubleshooting
Common issues:
- Incorrect or missing API credentials will cause authentication failures.
- Providing an ambiguous or unsupported natural language description in automatic mode may lead to incorrect resource or operation detection.
- Missing required fields when manually creating a role could result in API errors.
Error messages:
- Errors returned from the BookStack API will be included in the output JSON under an
errorproperty if "Continue on Fail" is enabled. - Authentication errors typically indicate invalid or expired tokens; verify credentials.
- Validation errors from the API usually mean required parameters are missing or malformed; ensure all mandatory fields are provided.
- Errors returned from the BookStack API will be included in the output JSON under an