BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API, enabling automation of content management tasks within a BookStack instance. It supports various operations on resources such as books, pages, chapters, shelves, users, roles, attachments, and tags.

Specifically for the Book resource with the Copy operation, the node allows duplicating an existing book by its ID. This is useful when you want to create a new book based on the content and structure of an existing one without manually recreating it.

Common scenarios include:

  • Quickly replicating a book template to start a new documentation set.
  • Backing up a book before making major edits.
  • Creating variations of a book for different audiences or purposes.

Example: Copy a book with ID 123 to create a duplicate in a target shelf.

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 infer the resource and operation automatically. Example: "Copy the book 'API Documentation'."
Resource (Shown if "Set Manually") Select the resource to operate on. Options: Book, Page, Chapter, Shelf, User, Role, Attachment, Tag
Operation (Shown if "Set Manually") Select the operation to perform. For Book resource includes: Create, Delete, Get, Get Many, Update, Copy, Move
ID The ID of the resource to act upon (required for operations like Copy)

For the Copy operation on the Book resource, the key property is:

  • ID: The identifier of the book to copy.

Output

The node outputs JSON data representing the response from the BookStack API after performing the copy operation. This typically includes details of the newly created copied book, such as its ID, name, description, and other metadata.

If the API returns binary data (not typical for copy), it would be handled accordingly, but this node primarily deals with JSON responses.

Output example snippet (conceptual):

{
  "id": 456,
  "name": "Copied Book Name",
  "description": "Copy of original book",
  ...
}

Dependencies

  • Requires connection to a BookStack instance via its API.
  • Needs an API token credential with appropriate permissions to perform copy operations.
  • The node expects the base URL and authentication tokens configured in n8n credentials for BookStack.
  • No additional external dependencies beyond the BookStack API.

Troubleshooting

  • Invalid ID or resource not found: Ensure the provided book ID exists in the BookStack instance.
  • Authentication errors: Verify that the API token and base URL are correctly configured and have sufficient permissions.
  • Permission denied: The user associated with the API token must have rights to copy books and access the target shelf.
  • Malformed request description (automatic mode): When using automatic mode, ambiguous or unclear descriptions may lead to incorrect resource/operation detection. Use manual mode if issues persist.
  • Network or connectivity issues: Confirm that the BookStack server is reachable from the n8n environment.

Links and References

Discussion