Overview
This node interacts with Twake Drive to manage files and directories. Specifically, the "Move File" operation moves a targeted file from its current location to another directory within the Twake instance. This is useful for organizing files, archiving, or restructuring storage without needing to download and re-upload files manually.
Practical examples:
- Automatically moving files uploaded to a temporary folder into categorized project folders.
- Archiving completed project files by moving them to an archive directory.
- Reorganizing files based on metadata or workflow triggers.
Properties
| Name | Meaning |
|---|---|
| File ID | ID of the targeted file to move. |
| Choose Destination Folder | Boolean option to specify whether to select a destination folder. |
| Directory ID | ID of the target directory where the file will be moved (required if "Choose Destination Folder" is true). |
Output
The node outputs JSON data representing the result of the move operation for each input item. The exact structure depends on the API response but typically includes details about the moved file such as its new location, ID, name, and metadata.
No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential for authenticating with the Twake Drive API.
- The node depends on internal helper functions (from
FilesHelpers) to perform the actual API calls. - Proper configuration of the Twake Drive API credentials in n8n is necessary.
Troubleshooting
Common issues:
- Invalid or missing File ID or Directory ID can cause failures.
- Insufficient permissions or invalid API credentials may lead to authorization errors.
- Specifying a destination folder without enabling "Choose Destination Folder" might cause unexpected behavior.
Error messages:
- Errors returned from the API are captured and included in the output under
errorMessageanderrorResponse. - If the node is not set to continue on failure, it will throw an error stopping execution.
- Errors returned from the API are captured and included in the output under
Resolutions:
- Verify that the File ID and Directory ID are correct and exist in the Twake Drive instance.
- Ensure the API key credential has sufficient permissions.
- Enable "Choose Destination Folder" if specifying a directory ID.
Links and References
- Twake Drive API Documentation (for detailed API capabilities)
- n8n Documentation (for general node usage and credential setup)