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 Page - Delete operation, it allows users to delete a page 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 pages.
  • Integrating BookStack page deletion into larger automation pipelines, e.g., cleaning up documentation pages after a project ends.
  • Managing BookStack content programmatically without manual intervention via the UI.

Example use case:

  • Automatically deleting a page when a related external document is archived or deleted elsewhere, keeping BookStack content synchronized.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation:
- Set Automatically
- Set Manually
Request Description (Shown if "Set Automatically" is chosen) Describe your request in natural language; the system will try to detect the resource and operation automatically. Example: "Delete the page with ID 123".
ID The unique identifier of the page to delete. Required for delete operations.

Output

The output is an array of JSON objects corresponding to each input item processed. For the delete operation on a page, the JSON output contains the response from the BookStack API after attempting to delete the specified page. This typically includes confirmation of deletion or error details if the operation failed.

No binary data output is produced by this operation.

Example output JSON structure (simplified):

{
  "json": {
    // API response confirming deletion or error message
  }
}

Dependencies

  • Requires connection to a BookStack instance via its API.
  • Needs an API authentication token credential configured in n8n with:
    • Base URL of the BookStack API.
    • Token and token secret for authorization.
  • The node uses HTTP requests authenticated with these credentials to perform actions.

Troubleshooting

  • Missing or invalid ID: The delete operation requires a valid page ID. If omitted or incorrect, the API will return an error. Ensure the ID is correct and corresponds to an existing page.
  • Authentication errors: If the API token or base URL is misconfigured, requests will fail with authorization errors. Verify credentials and endpoint URLs.
  • Resource not found: Attempting to delete a non-existent page ID will result in a "not found" error from the API.
  • Permission issues: The API token must have sufficient permissions to delete pages. Lack of permissions will cause failures.
  • Automatic detection inaccuracies: When using "Set Automatically" mode with a natural language description, the system tries to infer the operation and resource. Ambiguous or unclear descriptions may lead to wrong detections. Use manual mode for precise control.

Links and References

Discussion