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

The node supports two modes of operation:

  • Automatic mode: The user provides a natural language description of the request (e.g., "List all roles"), and the node attempts to infer the appropriate resource and operation.
  • Manual mode: The user explicitly selects the resource ("Role") and operation ("Get Many") from dropdown menus.

Typical use cases include:

  • Fetching all roles defined in a BookStack instance to audit permissions or synchronize role data.
  • Integrating role information into workflows that require role-based access control or reporting.
  • Automating retrieval of roles for further processing or conditional logic in n8n workflows.

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 roles"). The system uses this to infer the resource and operation.

Note: For the Role - Get Many operation, typically you would select "Set Manually" and choose "Role" as the resource and "Get Many" as the operation. Alternatively, you can describe your intent in the "Request Description" field if using automatic mode.

Output

The node outputs an array of JSON objects representing the retrieved roles. Each item corresponds to one role object returned by the BookStack API under the data property.

The exact structure of each role object depends on the BookStack API but generally includes fields such as role ID, name, and associated permissions.

No binary data output is produced by this operation.

Example output snippet (conceptual):

[
  {
    "id": 1,
    "name": "Admin",
    "permissions": [...]
  },
  {
    "id": 2,
    "name": "Editor",
    "permissions": [...]
  }
]

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.
    • Network connectivity problems to the BookStack server will result in request errors.
    • Using automatic mode with ambiguous or unsupported natural language descriptions may lead to incorrect resource/operation detection.
  • Error messages:

    • Authentication errors: Verify that the API token and base URL are correctly set in the credentials.
    • HTTP errors (4xx or 5xx): Check the validity of the request parameters and the availability of the BookStack API.
    • Parsing errors in automatic mode: Simplify or clarify the request description to improve detection accuracy.

Links and References

Discussion