BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API to manage digital book resources such as shelves, books, chapters, and pages. Specifically, for the Shelf - Create operation, it allows users to create a new shelf resource within BookStack. The node supports two modes of operation:

  • Automatic mode: Users provide a natural language description of their request (e.g., "Create a new shelf for project documentation"), and the node attempts to parse this description to determine the appropriate resource and operation, then constructs the API request accordingly.
  • Manual mode: Users explicitly specify the resource ("Shelf") and operation ("Create") along with required properties.

This node is beneficial in scenarios where users want to automate content organization in BookStack, such as programmatically creating shelves to categorize books or collections. For example, a user could automatically generate a shelf named "Engineering Docs" by describing the request in natural language or manually inputting the shelf name and description.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation: either "Set Automatically" or "Set Manually".
Request Description (Shown if "Set Automatically" selected) A natural language string describing what you want to do, e.g., "Create a new shelf for project documents". The system uses this to infer the resource and operation.
Name (Required) The name of the shelf to create.
Description (Optional) A textual description of the shelf.

Output

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

No binary data output is produced by this node.

Example output structure (simplified):

{
  "id": 123,
  "name": "Engineering Docs",
  "description": "Shelf for engineering documentation",
  "created_at": "2024-01-01T12:00:00Z",
  "updated_at": "2024-01-01T12:00:00Z"
}

Dependencies

  • Requires an API key credential for authenticating with the BookStack API.
  • The node expects the base URL and authentication tokens to be configured in the credentials.
  • The BookStack API must be accessible from the environment where n8n runs.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Providing incomplete or invalid property values (e.g., missing required "Name") will result in API errors.
    • In automatic mode, ambiguous or unclear request descriptions may lead to incorrect resource or operation detection.
  • Error messages:

    • Authentication errors: Check that the API token and base URL are correctly set in the credentials.
    • Validation errors from the API: Ensure all required fields like "Name" are provided and valid.
    • Parsing errors in automatic mode: Try simplifying or clarifying the request description.

Links and References

Discussion