Overview
This node integrates with Twake Drive, a cloud file storage service, allowing users to perform various file operations within their Twake instance. The "Upload File" operation specifically enables uploading files received by the node into a designated directory in Twake Drive.
Common scenarios for this node include:
- Automating file uploads from other workflows or external sources into Twake Drive.
- Organizing uploaded files into specific directories based on workflow logic.
- Integrating Twake Drive as a central repository for files processed or generated by n8n workflows.
For example, a user might receive files via email or webhook and use this node to upload those files directly into a project folder in Twake Drive for team access.
Properties
| Name | Meaning |
|---|---|
| Directory ID | The ID of the target directory where the file will be uploaded. This is required to specify the destination folder in Twake Drive. |
Output
The node outputs an array of items corresponding to each input item processed. Each item's json property contains the result of the upload operation, typically including metadata about the uploaded file such as its ID, name, size, and possibly URLs or paths within Twake Drive.
If an error occurs during upload, the output JSON will include:
errorMessage: A string describing the error.errorResponse: The raw error response data from the API, if available.
The node does not explicitly handle binary data output; it focuses on metadata about the uploaded file.
Dependencies
- Requires an API key credential for authenticating with Twake Drive's API.
- The node depends on internal helper functions (from
FilesHelpers/FilesHelpers) that implement the actual API calls for file operations. - Proper configuration of the Twake Drive API credentials in n8n is necessary.
Troubleshooting
Common Issues:
- Invalid or missing Directory ID: Uploads will fail if the target directory ID is incorrect or not provided.
- Authentication errors: If the API key credential is invalid or expired, the node will throw authentication errors.
- File size limits or unsupported file types may cause upload failures depending on Twake Drive restrictions.
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 stop execution and throw a detailed error including the item index.
- Errors returned from the API are captured and included in the output under
Resolution Tips:
- Verify the Directory ID exists and is accessible with the provided credentials.
- Ensure the API key credential is valid and has sufficient permissions.
- Check file size and type against Twake Drive limitations.
Links and References
- Twake Drive Official Documentation (for API details and usage)
- n8n Documentation on Creating Custom Nodes