Twake Drive icon

Twake Drive

Basic Twake Drive

Overview

This node interacts with Twake Drive to manage files and directories. Specifically, the Update File operation allows users to update an existing file's metadata, such as renaming it. This is useful when you want to modify file properties without re-uploading or duplicating the file.

Common scenarios include:

  • Renaming a file after it has been uploaded.
  • Correcting file names for better organization.
  • Updating file metadata programmatically in workflows that manage document lifecycles.

Example: You have a file with ID 12345 and want to rename it to report_final.pdf. Using this node’s Update File operation, you provide the file ID and the new name, and the file is updated accordingly.

Properties

Name Meaning
File ID The unique identifier of the file you want to update.
Name of the New File Boolean option to specify whether you want to rename the file during the update.
New Name The new name to assign to the file if "Name of the New File" is enabled.

Output

The node outputs the updated file information in the json field of each item. This typically includes metadata about the file after the update, such as its ID, name, and other relevant attributes returned by the Twake Drive API.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Twake Drive service.
  • The node depends on the Twake Drive API to perform file operations.
  • Proper configuration of the API credentials within n8n is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing File ID: Ensure the File ID provided exists and is correct.
    • Insufficient permissions: The API key used must have rights to update files.
    • Network or API errors: Check connectivity and API status.
  • Error messages:

    • Errors from the API are captured and returned in the output under errorMessage and errorResponse.
    • If the node is not set to continue on failure, it will throw an error stopping execution.
  • Resolution tips:

    • Verify the File ID is valid.
    • Confirm the API key has appropriate permissions.
    • Enable "Continue On Fail" if you want the workflow to proceed despite errors.

Links and References

Discussion