BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API to manage book-related content such as books, pages, chapters, and shelves. Specifically, for the Chapter - Create operation, it allows users to create a new chapter within a specified book in their BookStack instance.

Common scenarios where this node is beneficial include:

  • Automating the creation of structured documentation by programmatically adding chapters to books.
  • Integrating BookStack content management into larger workflows, e.g., creating chapters based on external data or triggers.
  • Quickly setting up new chapters without manual interaction with the BookStack UI.

Practical example:

  • Automatically create a new chapter titled "API Integration" inside a book with ID 123 whenever a new API version is released.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation:
- Set Automatically
- Set Manually
Request Description (Shown if Tool Description is "Set Automatically") Describe your request in natural language; the system will parse it to select resource and operation automatically. Example: "Create a new chapter about API integration."
Name The name/title of the chapter to create.
Book ID The ID of the book to which the new chapter belongs.

Output

The node outputs JSON data representing the response from the BookStack API after creating the chapter. This typically includes details of the newly created chapter such as its ID, name, associated book ID, and other metadata returned by the API.

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "id": 456,
  "name": "New Chapter Title",
  "book_id": 123,
  "created_at": "2024-06-01T12:00:00Z",
  ...
}

Dependencies

  • Requires an API key credential for authenticating with the BookStack API.
  • The node expects the BookStack API base URL and authentication tokens to be configured in the credentials.
  • The BookStack API must be accessible from the n8n environment.

Troubleshooting

  • Missing or invalid Book ID: The "Book ID" property is required when creating a chapter. Ensure it is provided and corresponds to an existing book in BookStack.
  • Authentication errors: Verify that the API key/token credentials are correctly set up and have sufficient permissions.
  • API endpoint errors: If the BookStack API base URL is incorrect or unreachable, requests will fail. Confirm the URL and network connectivity.
  • Empty or invalid chapter name: The "Name" property is mandatory. Providing an empty string may cause the API to reject the request.
  • Automatic mode parsing issues: When using "Set Automatically," ambiguous or unclear request descriptions might lead to incorrect resource or operation detection. Use clear, concise descriptions or switch to manual mode.

Links and References

Discussion