BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API, allowing users to manage various BookStack resources such as books, pages, chapters, shelves, users, roles, attachments, and tags. Specifically for the Attachment - Create operation, it enables uploading or creating new attachments within the BookStack system.

The node supports two modes of operation:

  • Automatic mode: Users provide a natural language description of their request, and the node attempts to infer the appropriate resource and operation.
  • Manual mode: Users explicitly select the resource (Attachment) and operation (Create), then provide the necessary parameters.

Practical examples include:

  • Automatically creating an attachment by describing the desired action in plain text.
  • Manually creating an attachment by specifying required fields directly.

This node is beneficial for automating content management workflows in BookStack, such as programmatically adding files or attachments to documentation or knowledge bases.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation: "Set Automatically" or "Set Manually".
Request Description (Shown only if "Set Automatically" is selected) A string where you describe what you want to do, e.g., "Create a new page about API documentation".

For the Attachment - Create operation specifically, no additional properties are explicitly defined in the provided snippet beyond these general ones. The node relies on either automatic inference from the description or manual input of resource and operation.

Output

The node outputs JSON data representing the response from the BookStack API after performing the create operation on the Attachment resource. This typically includes details of the newly created attachment such as its ID, name, URL, and metadata.

If the node supports binary data output for attachments (e.g., file uploads), this would represent the uploaded file's binary content or reference, but the provided code does not explicitly show handling of binary data for attachments.

Dependencies

  • Requires an API key credential for authenticating with the BookStack API.
  • The base URL and authentication tokens 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 incomplete or ambiguous request description in automatic mode may lead to incorrect resource/operation inference.
    • Missing required parameters when using manual mode can cause API errors.
  • Error messages:
    • Authentication errors usually indicate invalid or missing API tokens.
    • Validation errors from the API may occur if required fields for creating an attachment are missing or malformed.
  • Resolutions:
    • Verify that API credentials are correctly set up.
    • Use clear and specific descriptions in automatic mode or switch to manual mode for precise control.
    • Ensure all required fields for the attachment creation are provided.

Links and References

Discussion