BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API, enabling users to manage BookStack resources programmatically within n8n workflows. It supports various operations such as creating, copying, moving, updating, deleting, and retrieving resources like books, pages, chapters, shelves, users, roles, attachments, and tags.

Specifically for the User resource with the Copy operation, the node allows duplicating a user resource by sending a copy request to the BookStack API. This can be useful in scenarios where you want to replicate user settings or profiles quickly without manual re-entry.

The node also supports an "automatic" mode where you describe your intent in natural language, and it attempts to infer the appropriate resource and operation, making it easier for non-technical users to interact with BookStack.

Practical Examples

  • Copying a user profile to create a similar user with the same permissions.
  • Automating user management tasks such as cloning user accounts during onboarding.
  • Using natural language descriptions to perform copy operations without manually selecting resource and operation.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation: either "Set Automatically" (via description) or "Set Manually".
Request Description When "Set Automatically" is selected, provide a natural language description of the desired action (e.g., "Copy user JohnDoe"). The system will parse this to select resource and operation automatically.
Resource When "Set Manually" is selected, choose the resource type to operate on. Options include: Book, Page, Chapter, Shelf, User, Role, Attachment, Tag.
Operation When "Set Manually" is selected, choose the operation to perform on the selected resource. Options include: Create, Delete, Get, Get Many, Update, Copy, Move.
ID The ID of the resource to act upon (required for operations like get, update, delete, copy).

For the Copy operation on the User resource, the key input is the ID of the user to copy.

Output

The node outputs JSON data representing the response from the BookStack API after performing the requested operation. For the Copy operation on a User, this typically includes the details of the newly created copied user resource.

The output structure is:

{
  "json": {
    // API response object containing the copied user details
  },
  "pairedItem": {
    "item": <index_of_input_item>
  }
}

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the BookStack API.
  • The base URL and authentication tokens must be configured in the node credentials.
  • The node uses HTTP requests to communicate with the BookStack REST API endpoints.

Troubleshooting

  • Common Issues:

    • Incorrect or missing resource ID when performing copy operations will cause API errors.
    • Misconfigured API credentials or base URL will result in authentication failures.
    • Ambiguous or unsupported natural language descriptions may lead to incorrect automatic operation/resource detection.
  • Error Messages:

    • Authentication errors: Verify that the API token and base URL are correctly set in credentials.
    • Resource not found: Ensure the provided resource ID exists in BookStack.
    • Validation errors: Check required fields like ID are provided and valid.
  • Resolution Tips:

    • Use manual mode if automatic detection fails.
    • Double-check IDs and parameters before execution.
    • Enable "Continue On Fail" in the node to handle errors gracefully in workflows.

Links and References

Discussion