BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API to manage various BookStack resources such as books, pages, chapters, shelves, users, roles, attachments, and tags. Specifically for the Role resource with the Move operation, it allows moving a role resource within the BookStack system by specifying the target location.

The node supports two modes of operation:

  • Automatic mode: The user provides a natural language description of the desired action (e.g., "Move the role 'Editor' to another shelf"), and the node attempts to parse this description to determine the appropriate resource and operation.
  • Manual mode: The user explicitly selects the resource ("Role") and operation ("Move") and provides required parameters like the resource ID and target location.

Typical use cases include reorganizing roles or other resources in BookStack, automating content management workflows, or integrating BookStack operations into larger automation pipelines.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation: either "Set Automatically" or "Set Manually".
Request Description When "Set Automatically" is selected, describe your request in natural language (e.g., "Move the role 'Admin' to a new shelf"). This text is parsed to infer the resource and operation.

Note: For the Role - Move operation specifically, additional properties such as the resource ID and target location are expected but not explicitly listed in the provided input properties JSON. These are typically required to identify which role to move and where to move it.

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 requested operation.

For the Move operation on a Role resource, the JSON output will contain the updated role data after it has been moved, reflecting its new location or association within BookStack.

If the operation fails for any item, the output JSON for that item will contain an error field with the error message.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the BookStack API.
  • The node expects the BookStack API base URL and authentication tokens to be configured in the credentials.
  • Uses HTTP requests to communicate with the BookStack REST API endpoints.

Troubleshooting

  • Common issues:

    • Incorrect or missing resource ID when performing the move operation will cause errors.
    • Insufficient permissions or invalid API credentials can lead to authorization failures.
    • Malformed or ambiguous natural language descriptions in automatic mode may result in incorrect operation/resource detection or failure.
  • Error messages:

    • Errors returned from the BookStack API will be included in the output JSON under an error property if "Continue On Fail" is enabled.
    • Common HTTP errors include 401 Unauthorized (check API credentials), 404 Not Found (invalid resource ID), and 400 Bad Request (invalid parameters).
  • Resolution tips:

    • Verify that the API credentials are correctly set up and have sufficient permissions.
    • Ensure the resource ID provided exists and is correct.
    • Use manual mode if automatic detection does not correctly interpret the request.
    • Check the format of the natural language request for clarity and completeness.

Links and References

Discussion