Actions56
- Book Actions
- Page Actions
- Chapter Actions
- Shelf Actions
- User Actions
- Role Actions
- Attachment Actions
- Tag Actions
Overview
This node integrates with the BookStack API to manage various BookStack resources such as books, pages, chapters, shelves, users, roles, attachments, and tags. Specifically, for the Attachment - Update operation, it allows updating an existing attachment resource by its ID.
The node supports two modes of operation selection:
- Automatic mode: You describe your request in natural language, and the node attempts to infer the appropriate resource and operation.
- Manual mode: You explicitly select the resource and operation.
Typical use cases for the Attachment Update operation include modifying metadata or properties of an existing attachment in a BookStack instance, such as changing its name or other attributes (though the exact updatable fields for attachments are not detailed in the provided code).
Practical example:
- Updating an attachment's details by specifying its ID and new property values manually.
- Using a natural language description like "Update attachment with ID 123" to trigger the update automatically.
Properties
| Name | Meaning |
|---|---|
| Tool Description | Choose how to determine the resource and operation: either "Set Automatically" or "Set Manually". |
| Request Description | (Shown only if Tool Description is "automatic") A text field where you describe what you want to do; the system uses this to infer resource and operation. Example: "Update attachment with ID 123". |
| ID | The unique identifier of the attachment resource to update. Required for update operations. |
Note: For the Attachment resource, only the "ID" property is explicitly required for the update operation based on the provided snippet. Other update-specific fields for attachments are not shown in the extracted properties.
Output
The node outputs JSON data representing the response from the BookStack API after performing the update operation on the attachment. This typically includes the updated attachment object with its properties as returned by the API.
If the operation fails and "Continue On Fail" is enabled, the output will contain an error message in the JSON under the error key.
No binary data output is indicated for this operation.
Dependencies
- Requires an API authentication token credential for BookStack with at least write permissions to update attachments.
- The node expects the BookStack API base URL and authentication tokens to be configured in the credentials.
- HTTP requests are made to the BookStack API endpoints corresponding to
/attachments/{id}with the PUT method for updates.
Troubleshooting
Common issues:
- Missing or incorrect attachment ID will cause the API call to fail.
- Insufficient permissions or invalid API token may result in authorization errors.
- Incorrectly formatted request body or unsupported update fields could lead to validation errors from the API.
Error messages:
- Errors returned from the BookStack API will be passed through in the node output under the
errorkey if "Continue On Fail" is enabled. - Typical HTTP errors include 401 Unauthorized (check API credentials), 404 Not Found (invalid attachment ID), and 400 Bad Request (invalid update data).
- Errors returned from the BookStack API will be passed through in the node output under the
Resolution tips:
- Verify the attachment ID is correct and exists in BookStack.
- Ensure API credentials have proper permissions.
- Use manual mode to explicitly set parameters if automatic detection fails.