Actions40
- 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, including Attachments. Specifically, the Attachment - Update operation allows users to update an existing attachment resource by its ID. This is useful for scenarios where you need to modify metadata or properties of an attachment already stored in BookStack.
Practical examples include:
- Updating the name or description of an attachment file.
- Changing attachment details after upload without re-uploading the file.
- Automating updates to attachments based on external triggers or workflows.
The node supports two modes for specifying the operation: automatic (where a natural language request description determines the action) and manual (explicitly selecting resource and operation).
Properties
| Name | Meaning |
|---|---|
| Tool Description | Choose how to determine the resource and operation: - Set Automatically - Set Manually |
| Request Description | (Shown if "Set Automatically" selected) Describe your request in natural language; the system will infer resource and operation automatically. Example: "Update attachment with ID 123". |
| ID | The unique identifier of the attachment resource to update. Required for update operations. |
Output
The node outputs JSON data representing the updated attachment resource as returned by the BookStack API. The structure typically includes fields such as the attachment's ID, name, URL, and other metadata reflecting the current state after the update.
No binary data output is produced by this operation.
Example output snippet (simplified):
{
"id": 123,
"name": "Updated Attachment Name",
"url": "https://bookstack.example.com/uploads/attachment-file.pdf",
...
}
Dependencies
- Requires connection to a BookStack instance via its API.
- Needs an API authentication token credential configured in n8n with base URL and token information.
- The node uses HTTP requests authenticated with a token header to communicate with the BookStack API.
Troubleshooting
- Missing or invalid ID: The update operation requires a valid attachment ID. Ensure the ID parameter is provided and corresponds to an existing attachment.
- Authentication errors: Verify that the API token and base URL credentials are correctly set up and have sufficient permissions.
- Invalid request body: If updating fields not supported by the API or sending malformed data, the API may reject the request. Confirm the fields being updated are valid for attachments.
- Automatic mode parsing issues: When using automatic mode, ambiguous or incomplete request descriptions might lead to incorrect resource or operation inference. Use clear and specific descriptions or switch to manual mode.
Common error messages:
"error": "Resource not found"— Check the attachment ID."error": "Unauthorized"— Check API credentials."error": "Bad Request"— Validate input parameters.