Overview
This node integrates with the OnlyOffice API to manage files and folders within an OnlyOffice environment. It supports various operations such as listing, creating, renaming, moving, copying, and deleting files or folders.
For the File Delete operation specifically, the node deletes a file identified by its ID. Users can choose whether to delete the file immediately or move it to the trash (soft delete). This is useful for automating file cleanup, managing document lifecycle, or integrating OnlyOffice file management into broader workflows.
Practical example: Automatically delete temporary files after processing them in a workflow, either by moving them to trash for possible recovery or deleting them permanently.
Properties
| Name | Meaning |
|---|---|
| Item ID | The unique identifier of the file or folder to delete. |
| Delete Immediately | Boolean option to specify if the file should be deleted permanently (true) or moved to trash (false). |
Output
The output JSON contains the response from the OnlyOffice API after attempting to delete the specified file. This typically includes confirmation of deletion or details about the deleted item.
If an error occurs during deletion, the output will contain an error field with the error message.
No binary data is output by this operation.
Dependencies
- Requires an API key credential for OnlyOffice API authentication.
- The node uses the base URL configured in the OnlyOffice API credentials.
- Network access to the OnlyOffice API endpoint is necessary.
Troubleshooting
Common issues:
- Invalid or missing
Item ID: The node requires a valid file ID to delete; ensure the ID is correct. - Insufficient permissions: The API key must have rights to delete files.
- Network or authentication errors: Verify API credentials and network connectivity.
- Invalid or missing
Error messages:
"Unknown file operation: delete": Indicates an internal misconfiguration; ensure the operation is set correctly.- API errors returned from OnlyOffice will be passed through; check the error message for details (e.g., "File not found" or "Access denied").
To resolve errors, verify input parameters, credentials, and API access rights.
Links and References
- OnlyOffice API Documentation
- n8n documentation on Creating Custom Nodes