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 Tag resource with the Get Many operation, it retrieves a list of tags from the BookStack system.

The node supports two modes for specifying the request:

  • Automatic mode: You provide a natural language description of what you want to do (e.g., "List all tags"), and the node attempts to infer the correct resource and operation.
  • Manual mode: You explicitly select the resource ("Tag") and operation ("Get Many").

This node is useful in scenarios where you want to programmatically fetch multiple tags from your BookStack instance, for example, to display them in a dashboard, synchronize tags with another system, or perform bulk operations based on tag data.

Practical Example

  • Fetching all tags to show in a custom UI or report.
  • Retrieving tags to filter or categorize content in an automation workflow.
  • Integrating BookStack tags with other tools by exporting tag lists.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation: either "Set Automatically" or "Set Manually".
Request Description When "Set Automatically" is selected, describe your request in natural language (e.g., "List all tags"). This helps the node infer the correct resource and operation.

Note: For this specific Resource-Operation combination (Tag - Get Many), only these properties are relevant based on the provided input properties.

Output

The node outputs JSON data representing the response from the BookStack API for the requested resource.

For the Get Many Tags operation, the output JSON contains an array of tag objects under the root property data. Each tag object typically includes details such as tag ID, name, and possibly other metadata defined by the BookStack API.

Example structure (simplified):

{
  "data": [
    {
      "id": 1,
      "name": "example-tag",
      ...
    },
    {
      "id": 2,
      "name": "another-tag",
      ...
    }
  ]
}

No binary data output is indicated for this operation.

Dependencies

  • Requires connection to a BookStack instance via its API.
  • Needs an API token credential configured in n8n to authenticate requests.
  • The base URL and authentication tokens must be set up correctly in the node credentials.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Providing ambiguous or unsupported natural language descriptions in automatic mode may lead to incorrect resource/operation detection.
    • Network connectivity problems to the BookStack server can cause request timeouts or errors.
  • Error messages:

    • Authentication errors usually indicate invalid or expired API tokens; verify and update credentials.
    • HTTP 404 errors may occur if the resource path is incorrect; ensure the resource and operation are properly selected.
    • Parsing errors might happen if the API response format changes; check BookStack API version compatibility.
  • Resolutions:

    • Double-check API credentials and permissions.
    • Use manual mode if automatic detection fails.
    • Confirm network access to the BookStack API endpoint.

Links and References

Discussion