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 Chapter resource with the Get Many operation, the node retrieves multiple chapter records from the BookStack system.

Common scenarios where this node is beneficial include:

  • Fetching a list of all chapters within a BookStack instance for reporting or synchronization.
  • Automating content management workflows by retrieving chapter data to process or display elsewhere.
  • Integrating BookStack chapter data into other systems or dashboards.

Practical example:

  • A user wants to get all chapters available in their BookStack library to generate an overview report or to sync chapter metadata with another documentation tool.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation:
- Set Automatically
- Set Manually
Request Description (Shown only if "Set Automatically" is selected) Describe what you want to do (e.g., "Create a new page about API documentation"). The system uses this description to automatically select the appropriate resource and operation.

Note: For the Chapter - Get Many operation, typically the "Tool Description" would be set to "Set Manually" and the resource set to "Chapter" with operation "Get Many". If "Set Automatically" is used, the node attempts to parse the request description to detect the intended resource and operation.

Output

The output is an array of JSON objects representing the retrieved chapters. Each item corresponds to one chapter resource fetched from the BookStack API.

The structure of each JSON object matches the BookStack API's chapter representation under the data property of the response. It typically includes fields like chapter ID, name, description, book association, creation date, and other metadata.

No binary data output is produced by this operation.

Example output snippet (simplified):

[
  {
    "id": 123,
    "name": "Introduction",
    "description": "Overview of the topic",
    "book_id": 45,
    "created_at": "2023-01-01T12:00:00Z",
    ...
  },
  {
    "id": 124,
    "name": "Advanced Concepts",
    "description": "Detailed explanations",
    "book_id": 45,
    "created_at": "2023-01-02T12:00:00Z",
    ...
  }
]

Dependencies

  • Requires connection to a BookStack instance via its API.
  • Needs an API token credential with appropriate permissions to read chapter data.
  • The base URL and authentication token must be configured in the node credentials.
  • Pagination is supported using offset-based pagination with parameters count and offset.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Using "Set Automatically" with ambiguous or unclear request descriptions may lead to incorrect resource or operation detection.
    • Network connectivity problems to the BookStack server can cause request timeouts or errors.
    • Pagination parameters not handled properly might result in incomplete data retrieval.
  • Error messages:

    • Authentication errors usually indicate invalid or expired tokens; verify and update credentials.
    • HTTP 404 errors may occur if the resource path is incorrect or the resource does not exist.
    • Validation errors if required parameters are missing when manually setting operations.
  • Resolutions:

    • Double-check API credentials and ensure they have sufficient permissions.
    • When using automatic mode, provide clear and specific request descriptions.
    • Verify the BookStack API base URL is correct and accessible.
    • Handle pagination properly if expecting large datasets.

Links and References

Discussion