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, the Chapter - Update operation allows users to update an existing chapter's details by specifying its ID and new properties like name.

Common scenarios for this node include:

  • Updating the title of a chapter in a documentation or knowledge base system.
  • Modifying chapter metadata programmatically as part of a content management workflow.
  • Automating updates to chapters based on external triggers or data sources.

For example, you might use this node to rename a chapter after receiving updated information from a content editor or to correct typos in chapter titles across multiple books.

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) A text description of what you want to do; the system tries to infer the resource and operation automatically. Example: "Update chapter 123 with new title".
ID The unique identifier of the chapter to update. Required.
Name The new name/title of the chapter. Required when updating.

Output

The node outputs JSON data representing the response from the BookStack API after performing the update operation. This typically includes the updated chapter object with its properties such as id, name, and other metadata returned by the API.

No binary data output is produced by this operation.

Example output structure (simplified):

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

Dependencies

  • Requires an API key credential for authenticating with the BookStack API.
  • The node expects the BookStack instance base URL and authentication tokens configured in n8n credentials.
  • The API requests are made to endpoints under /api/chapters/{id} using HTTP PUT method for updates.

Troubleshooting

  • Missing or invalid ID: If the chapter ID is not provided or incorrect, the API will return an error indicating the resource was not found. Ensure the ID corresponds to an existing chapter.
  • Authentication errors: If the API key or token is missing or invalid, the request will fail with an authorization error. Verify that the API credentials are correctly set up in n8n.
  • Validation errors: If required fields like name are empty or invalid, the API may reject the update. Provide valid values for all required properties.
  • Automatic detection issues: When using "Set Automatically" mode with a free-text request description, the node attempts to parse the intent. Ambiguous or unclear descriptions may lead to incorrect resource or operation selection. In such cases, switch to "Set Manually" mode.

Links and References

Discussion