Twake Drive icon

Twake Drive

Basic Twake Drive

File → Update File

AI-generated

Overview

The node performs the 'Update File' operation within the 'File' resource of Twake Drive. It allows users to update an existing file in Twake Drive by selecting the file either through a dropdown list or by manually entering the file ID. Users can optionally set a custom new name for the file during the update. This operation is useful for workflows that need to modify file metadata or rename files programmatically within Twake Drive.

Use Case Examples

  1. Updating a file's name in Twake Drive by selecting the file from a folder dropdown and specifying a new name.
  2. Manually updating a file by providing its ID and optionally renaming it.

Properties

Name Meaning
File Select Mode Determines how the file to update is selected, either from a dropdown list or by manually entering the file ID.
Target Folder (Source) Name or ID Specifies the folder containing the file when using dropdown mode. Leave empty for root folder. This property is shown only when file select mode is dropdown.
File (in This Folder) Name or ID Selects the file from the list of files in the specified folder when using dropdown mode.
File ID (Manual) Manually enter the file ID when file select mode is set to 'By ID (Manual)'.
Name of the New File Boolean flag indicating whether to set a custom new name for the file during update.
New Name The new name to assign to the file if 'Name of the New File' is set to true.

Output

JSON

  • id - The unique identifier of the updated file.
  • name - The updated name of the file, if renamed.
  • parentDirId - The ID of the parent directory containing the file.
  • updatedAt - Timestamp indicating when the file was last updated.

Dependencies

  • An OAuth2 API credential for Twake Drive is required to authenticate and authorize the node's operations.

Troubleshooting

  • Common issues include providing an invalid file ID or selecting a file that does not exist in the specified folder, which may result in errors indicating the file could not be found.
  • Errors related to authentication failures due to invalid or expired OAuth2 credentials can occur; ensure the credentials are valid and have the necessary permissions.
  • If the 'New Name' is set but left empty, the operation might fail or not rename the file as expected; always provide a valid new name when enabling this option.

Discussion