BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API, allowing users to manage BookStack resources such as books, pages, chapters, shelves, users, roles, attachments, and tags. It supports common operations like creating, retrieving (single or multiple), updating, and deleting these resources.

A key feature is the option to either manually specify the resource and operation or describe the desired action in natural language. When using the automatic mode, the node attempts to parse the description to determine the appropriate resource and operation, simplifying interaction for users unfamiliar with the API details.

Practical examples:

  • Automatically create a new page titled "API Documentation" by describing the request.
  • Retrieve details of a specific book by providing its ID.
  • List all chapters within a book.
  • Update the description of a shelf by specifying its ID and new description.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation:
- Set Automatically: Describe your request in natural language.
- Set Manually: Explicitly select resource and operation.
Request Description (Shown if Tool Description is Automatic) Describe what you want to do, e.g., "Create a new page about API documentation". The system uses this to infer resource and operation.
ID (Required for Get, Update, Delete operations) The unique identifier of the resource to act upon.

Output

The node outputs JSON data representing the response from the BookStack API for the requested operation. This includes detailed information about the resource(s) involved, such as book details, page content, chapter info, etc.

If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.

No binary data output is produced by this node.

Dependencies

  • Requires connection credentials for the BookStack API, including:

    • Base URL of the BookStack instance.
    • An API token and secret for authentication.
  • The node uses HTTP requests authenticated via these credentials to interact with the BookStack REST API.

Troubleshooting

  • Common Issues:

    • Incorrect or missing resource ID when performing Get, Update, or Delete operations will cause errors.
    • Improperly formatted or incomplete descriptions in automatic mode may lead to incorrect resource or operation selection.
    • Authentication failures due to invalid or expired API tokens.
  • Error Messages:

    • Errors returned from the BookStack API are passed through; typical messages include "Resource not found" or "Unauthorized".
    • If the node throws an error about missing parameters, verify that required fields like ID or name are provided.
  • Resolutions:

    • Ensure all required input properties are correctly set.
    • Verify API credentials and base URL configuration.
    • For automatic mode, provide clear and concise descriptions matching expected keywords.

Links and References

Discussion