BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API to manage various resources such as books, pages, chapters, shelves, users, roles, attachments, and tags. Specifically for the Role resource with the Delete operation, it allows you to delete a role by its ID from your BookStack instance.

Common scenarios where this node is beneficial include automating content management workflows, cleaning up unused or obsolete roles, and integrating role management into larger automation pipelines.

For example, if you want to programmatically remove a user role that is no longer needed in your documentation system, you can use this node to delete the role by specifying its ID.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation:
- Set Automatically
- Set Manually
Request Description (Shown only if "Set Automatically" is selected) Describe what you want to do in natural language; the system will try to infer the resource and operation automatically. Example: "Delete role with ID 5".
ID The unique identifier of the Role resource to delete. Required for Delete operation.

Output

The node outputs JSON data representing the response from the BookStack API after attempting to delete the specified role. Typically, a successful delete operation returns an empty object or confirmation message indicating the role was deleted.

If the operation fails, the output JSON contains an error field with the error message.

No binary data output is produced by this node.

Example output on success:

{}

Example output on failure:

{
  "error": "Role not found"
}

Dependencies

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

Troubleshooting

  • Missing or invalid ID: If the ID property is empty or incorrect, the API will return an error indicating the role could not be found. Ensure the correct role ID is provided.
  • Authentication errors: If the API key or token is invalid or missing, requests will fail with authorization errors. Verify the API credentials are correctly set up.
  • Network issues: If the BookStack API endpoint is unreachable, the node will throw network-related errors. Check connectivity and API availability.
  • Permission issues: Deleting roles requires appropriate permissions in BookStack. Lack of permission will result in authorization errors.

Links and References

Discussion