Twake Drive icon

Twake Drive

Basic Twake Drive

File → Rename File

AI-generated

Overview

This node operation renames a file in Twake Drive. It allows users to specify the file either by browsing through a dropdown menu or by manually entering the file ID. The user can also specify the target folder where the file resides. This operation is useful for organizing files by changing their names without moving or duplicating them. For example, renaming a report file from "report_draft.txt" to "report_final.txt" to reflect its updated status.

Use Case Examples

  1. Renaming a file by selecting it from a folder dropdown and providing a new name.
  2. Renaming a file by manually entering its file ID and specifying the new name.

Properties

Name Meaning
File Select Mode Determines how the file to rename is selected, either by browsing a dropdown or by manually entering the file ID.
Target Folder (Source) Name or ID Specifies the folder containing the file to rename. Can be left empty for the root folder. Only shown when file select mode is dropdown.
File (in This Folder) Name or ID Selects the file to rename from the dropdown list of files in the specified folder. Only shown when file select mode is dropdown.
File ID (Manual) Manually enter the file ID to rename. Only shown when file select mode is by ID.
New Name The new name to assign to the file being renamed.

Output

JSON

  • id - The unique identifier of the renamed file.
  • name - The new name of the file after renaming.
  • parentId - The ID of the parent folder containing the file.
  • mimeType - The MIME type of the file.
  • createdAt - Timestamp when the file was created.
  • updatedAt - Timestamp when the file was last updated.

Dependencies

  • Requires OAuth2 API credentials for Twake Drive to authenticate and authorize file operations.

Troubleshooting

  • Common issues include providing an invalid file ID or folder ID, which results in errors indicating the file or folder was not found.
  • Errors may occur if the new file name is invalid or conflicts with existing files in the same folder.
  • Ensure the OAuth2 credentials are valid and have sufficient permissions to rename files in Twake Drive.

Discussion