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 Shelf resource with the Copy operation, it allows duplicating an existing shelf by sending a copy request to the BookStack server.

The node supports two modes of operation:

  • Automatic mode: You provide a natural language description of what you want to do (e.g., "Copy a shelf named 'My Shelf'"), and the node attempts to parse this description to determine the resource and operation automatically.
  • Manual mode: You explicitly select the resource ("Shelf") and operation ("Copy") and provide required parameters like the shelf ID.

Practical Use Cases

  • Quickly duplicating a shelf collection in BookStack to create a similar set of books or content without manually recreating it.
  • Automating content management workflows where shelves need to be copied programmatically based on triggers or other automation logic.
  • Using natural language descriptions to simplify API interactions for non-technical users.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation: either "Set Automatically" or "Set Manually".
Request Description (Shown only if "Set Automatically" is selected) A text input where you describe your request in natural language, e.g., "Copy a shelf named 'My Shelf'". The system uses this to infer the resource and operation.

Output

The node outputs JSON data representing the response from the BookStack API after performing the copy operation on the shelf resource. This typically includes details of the newly created shelf copy, such as its ID, name, description, and other metadata returned by the API.

If multiple input items are processed, the output is an array of JSON objects paired with each input item.

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.
  • The BookStack API must support the /shelfs/{id}/copy POST endpoint for copying shelves.

Troubleshooting

  • Common issues:

    • Incorrect or missing shelf ID when using manual mode will cause the API call to fail.
    • If the API credentials are invalid or missing, authentication errors will occur.
    • Natural language parsing in automatic mode may not always correctly detect the intended resource or operation, leading to unexpected behavior.
  • Error messages:

    • Authentication errors: Check that the API token and base URL are correctly configured.
    • 404 Not Found: Verify that the shelf ID exists and is correct.
    • 400 Bad Request: Ensure all required parameters are provided and valid.
  • Resolutions:

    • Double-check input parameters, especially the shelf ID.
    • Confirm API credentials and permissions.
    • When using automatic mode, try simplifying or clarifying the request description.

Links and References

Discussion