BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API to manage content resources such as books, pages, chapters, and shelves. Specifically for the Chapter - Update operation, it allows updating an existing chapter's details by specifying its ID and new properties like name. This is useful in scenarios where you want to programmatically modify chapter titles or related metadata within a BookStack instance.

Practical examples include:

  • Renaming a chapter after content revisions.
  • Updating chapter information as part of an automated documentation workflow.
  • Synchronizing chapter data from external sources into BookStack.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation:
- Set Automatically
- Set Manually
Request Description (Shown if "Set Automatically" selected) Describe your request in natural language; the system will infer the resource and operation. Example: "Update chapter title for API section".
ID The unique identifier of the chapter to update. Required for update operations.
Name The new name/title of the chapter. Required when updating a chapter.

Output

The node outputs JSON data representing the updated chapter resource returned by the BookStack API. This typically includes fields such as the chapter's ID, name, creation and update timestamps, and other metadata as provided by the API response.

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "id": 123,
  "name": "Updated Chapter Title",
  "created_at": "2023-01-01T12:00:00Z",
  "updated_at": "2023-01-02T15:30:00Z",
  ...
}

Dependencies

  • Requires connection to a BookStack instance via its API.
  • Needs an API authentication token credential configured in n8n with base URL and token details.
  • The node uses HTTP PUT requests to update chapter resources at endpoints like /api/chapters/{id}.

Troubleshooting

  • Missing or invalid ID: The update operation requires a valid chapter ID. Ensure the ID property is set and corresponds to an existing chapter.
  • Authentication errors: Verify that the API token credential is correctly configured and has sufficient permissions to update chapters.
  • Invalid property values: The name field must be non-empty. Empty or invalid names may cause API errors.
  • API endpoint issues: Confirm the base URL is correct and accessible. Network or URL misconfiguration can lead to request failures.
  • Automatic detection inaccuracies: If using automatic mode with natural language descriptions, ensure the description clearly mentions "chapter" and "update" keywords to avoid incorrect resource or operation inference.

Links and References

Discussion