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 - Delete operation, it allows users to delete a role resource by specifying its ID.

Common scenarios where this node is beneficial include automating content management workflows in BookStack, such as programmatically deleting obsolete or unwanted roles without manual intervention. For example, an administrator could use this node to remove a role that is no longer needed in their BookStack instance as part of a cleanup process.

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 your request in natural language; the system attempts to infer the resource and operation automatically. Example: "Delete role with ID 123".
ID The unique identifier of the role resource to delete. This is required for the Delete operation.

Output

The output JSON contains the response from the BookStack API after attempting to delete the specified role. Typically, for a successful DELETE request, the API returns confirmation data or an empty object indicating the resource was deleted.

  • json: The main output field containing the API response.
  • No binary data output is produced by this operation.

Example output snippet after deletion might look like:

{
  "json": {
    // API response confirming deletion, often empty or status message
  }
}

Dependencies

  • Requires connection to a BookStack instance via its API.
  • Needs an API token credential configured in n8n with:
    • Base URL of the BookStack API.
    • Authorization token and secret.
  • The node uses HTTP DELETE requests to the endpoint /roles/{id} to perform deletions.

Troubleshooting

  • Missing or invalid ID: If the ID property is not provided or incorrect, the API will return an error indicating the resource cannot be found. Ensure the correct role ID is supplied.
  • Authentication errors: If the API credentials are missing, invalid, or expired, the node will fail with authentication errors. Verify the API token and base URL configuration.
  • Permission issues: The API user must have sufficient permissions to delete roles. Lack of permission will result in authorization errors.
  • Network or connectivity problems: Ensure the BookStack API endpoint is reachable from the n8n environment.
  • Automatic detection failures: When using automatic mode with a natural language description, ambiguous or incomplete descriptions may cause incorrect operation/resource detection. Use manual mode if necessary.

Links and References

Discussion