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

Common scenarios where this node is beneficial include automating content management workflows in BookStack, such as programmatically removing outdated or unwanted shelves from your documentation or knowledge base collections.

Practical example:

  • Automatically deleting a shelf when a project phase ends or when a collection of documents is no longer relevant.
  • Cleaning up test or temporary shelves created during automated testing or content generation.

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., "Delete shelf with ID 123") to let the system select the appropriate resource and operation automatically.
ID The unique identifier of the shelf resource to delete. Required for delete operation.

Output

The output JSON contains the response from the BookStack API after attempting to delete the specified shelf. Typically, this will be an empty object or confirmation message indicating successful deletion.

If the node encounters an error (e.g., invalid ID or permission issues), the output JSON 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": "Shelf not found"
}

Dependencies

  • Requires an API key credential for authenticating with the BookStack API.
  • The node expects the BookStack instance base URL and authentication tokens to be configured in the credentials.
  • The API endpoint used follows the pattern: /api/shelfs/{id} with HTTP DELETE method.

Troubleshooting

  • Common Issues:

    • Invalid or missing shelf ID: Ensure the ID provided corresponds to an existing shelf.
    • Authentication errors: Verify that the API key/token credentials are correctly set and have sufficient permissions.
    • Network or connectivity problems: Confirm that the BookStack server is reachable from n8n.
  • Error Messages:

    • "Shelf not found": The specified shelf ID does not exist. Double-check the ID.
    • "Unauthorized" or "Authentication failed": Check API credentials and permissions.
    • Other HTTP errors may indicate server issues or malformed requests.

To resolve errors, verify input parameters, ensure correct credentials, and consult BookStack API documentation for permission requirements.

Links and References

Discussion