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 Page - Update operation allows users to update an existing page's details within BookStack, including its name and HTML content.

Common scenarios for this node include:

  • Updating documentation pages with new or corrected information.
  • Modifying the title or content of a page in a knowledge base.
  • Automating content updates based on external triggers or workflows.

For example, you could use this node to programmatically update a page’s HTML content after generating new documentation from another system, ensuring your BookStack pages stay current without manual editing.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation:
- Set Automatically
- Set Manually
Request Description (Shown if "Set Automatically") Describe what you want to do (e.g., "Update page content about API docs"). The system tries to infer the resource and operation from this text.
ID The unique identifier of the page to update (required).
Name The new name/title of the page (required).
HTML Content The updated HTML content of the page.

Output

The node outputs JSON data representing the updated page resource as returned by the BookStack API. This typically includes fields such as the page ID, name, HTML content, and other metadata reflecting the updated state.

No binary data output is produced by this operation.

Example output snippet (simplified):

{
  "id": 123,
  "name": "Updated Page Title",
  "html": "<h1>Updated Content</h1><p>New page content here.</p>",
  ...
}

Dependencies

  • Requires access to a BookStack instance with API enabled.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The node uses the BookStack REST API endpoints under /api/pages/{id} with HTTP PUT method for updating.

Troubleshooting

  • Missing or invalid ID: The update operation requires a valid page ID. Ensure the ID property is correctly set; otherwise, the API will return an error.
  • Authentication errors: Verify that the API token credential is correct and has sufficient permissions to update pages.
  • Invalid HTML content: If the HTML content is malformed, the API might reject the update. Validate HTML before sending.
  • Automatic detection issues: When using "Set Automatically," ambiguous or unclear request descriptions may lead to incorrect resource or operation detection. Use manual mode if automatic inference fails.

Common error messages:

  • 404 Not Found: The specified page ID does not exist.
  • 401 Unauthorized: Authentication failed due to invalid or missing credentials.
  • 400 Bad Request: Invalid input data, such as missing required fields or invalid HTML.

Resolving these usually involves verifying input parameters, credentials, and API endpoint accessibility.

Links and References

Discussion