BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API to manage various resources such as books, pages, chapters, shelves, users, roles, attachments, and tags. Specifically for the Attachment - Delete operation, it allows users to delete an attachment resource by specifying its ID.

Common scenarios where this node is beneficial include automating content management workflows in BookStack, such as removing outdated or incorrect attachments programmatically. For example, a user might automate cleanup of unused files attached to documentation pages or remove sensitive files after a certain event.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation: either "Set Automatically" or "Set Manually".
Request Description (Shown only if "Set Automatically" is selected) A text description of what you want to do; the system uses this to infer the resource and operation automatically.
ID The unique identifier of the attachment 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 attachment. Typically, this will be an empty object or confirmation message indicating successful deletion. If an error occurs, the output will contain an error field with the error message.

No binary data is output by this node.

Example output on success:

{}

Example output on failure:

{
  "error": "Resource not found"
}

Dependencies

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

Troubleshooting

  • Missing or invalid ID: The delete operation requires a valid attachment ID. Omitting this or providing an incorrect ID will cause errors like "Resource not found".
  • Authentication errors: Ensure that the API token and base URL are correctly set in the credentials. Authentication failures will prevent any API calls.
  • API endpoint issues: The node constructs URLs based on the resource and ID. If the BookStack API version or endpoint changes, the node may fail.
  • Automatic detection inaccuracies: When using "Set Automatically" mode, the node tries to infer the operation and resource from the request description. Ambiguous or unclear descriptions may lead to wrong operations being executed.

To resolve common errors:

  • Verify the attachment ID exists in BookStack before deleting.
  • Check API credentials and permissions.
  • Use manual mode if automatic detection does not work as expected.

Links and References

Discussion