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 Tag resource with the Copy operation, it allows duplicating an existing tag by its ID.

The node supports two modes of operation selection:

  • Automatic mode: You provide a natural language description of your request, and the node attempts to infer the resource and operation.
  • Manual mode: You explicitly select the resource (e.g., Tag) and operation (e.g., Copy).

In practical terms, this node is useful when you want to programmatically duplicate tags within your BookStack instance, which can help in organizing or reusing metadata labels without manually recreating them.

Example use case:
You have a tag "Important" used across multiple documents and want to create a copy named "Urgent" to apply to a different set of pages. Using this node's Copy operation on the Tag resource, you can automate that duplication process.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation:
- Set Automatically
- Set Manually
Request Description (Shown only if Tool Description is "Set Automatically") Describe your request in natural language; the system will try to detect the appropriate resource and operation automatically. Example: "Copy the tag 'Urgent'".

Note: For the Copy operation on the Tag resource, you must also provide the ID of the tag to copy (not shown in the provided properties snippet but required by the node).

Output

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

If the operation fails, the output JSON will contain an error message describing the issue.

No binary data output is involved in this operation.

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.
    • Authorization token and secret.
  • The node uses HTTP requests authenticated with these credentials to perform operations.

Troubleshooting

  • Common issues:

    • Providing an invalid or missing tag ID will cause the copy operation to fail.
    • Incorrect or expired API credentials will result in authentication errors.
    • Network connectivity problems to the BookStack server will cause request failures.
  • Error messages:

    • Authentication errors: Check that the API token and base URL are correctly configured.
    • Resource not found: Verify the tag ID exists in your BookStack instance.
    • Permission denied: Ensure the API token has sufficient permissions to copy tags.
  • Resolution tips:

    • Double-check the tag ID parameter.
    • Confirm API credentials and permissions.
    • Test connectivity to the BookStack API endpoint outside n8n if needed.

Links and References


This summary focuses on the Tag resource's Copy operation as requested, based on static analysis of the provided source code and property definitions.

Discussion