Overview
The node integrates with OnlyOffice to manage files and folders via its API. It supports operations such as listing, creating, renaming, moving, copying, and deleting files or folders within an OnlyOffice environment.
For the File Copy operation specifically, the node copies a file identified by its ID to a specified destination folder. It also allows handling conflicts during the copy process by choosing whether to skip, overwrite, or duplicate files if a conflict arises.
This node is beneficial in automation workflows where managing document storage and organization in OnlyOffice is required, such as backing up files, reorganizing project documents, or duplicating templates for new projects.
Practical example
- Copy a project proposal document from one folder to another while ensuring that if a file with the same name exists, it is duplicated rather than overwritten.
- Automate backup of important files by copying them to a designated backup folder regularly.
Properties
| Name | Meaning |
|---|---|
| Item ID | ID of the file to copy. |
| Destination Folder ID | ID of the folder where the file will be copied to. |
| Conflict Resolution | How to handle conflicts when copying: - Skip: Do not copy if a conflict exists. - Overwrite: Replace existing file. - Duplicate: Create a copy with a different name. |
Output
The output is a JSON object representing the result of the copy operation. This typically includes metadata about the copied file such as its new ID, title, and other relevant attributes returned by the OnlyOffice API.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for OnlyOffice with access to the OnlyOffice API.
- The node uses the OnlyOffice API base URL configured in the credentials.
- Network connectivity to the OnlyOffice server is necessary.
Troubleshooting
Common issues:
- Invalid or missing file ID or destination folder ID can cause errors.
- Insufficient permissions on the OnlyOffice account may prevent copying.
- Network or authentication failures can interrupt the API request.
Error messages:
- Errors related to unknown operations indicate misconfiguration of the operation parameter.
- API errors from OnlyOffice (e.g., 404 Not Found) usually mean the specified file or folder does not exist.
- Conflict resolution errors occur if the chosen strategy is incompatible with the current state.
Resolutions:
- Verify that the provided IDs are correct and accessible.
- Ensure the API key has sufficient permissions.
- Check network connectivity and OnlyOffice server status.
- Choose an appropriate conflict resolution option based on your use case.
Links and References
- OnlyOffice API Documentation
- n8n documentation on Creating Custom Nodes