Move file to trash
Move file to trash
Moves a file to the Google Drive trash.
Options
Drive connection
Select the Connection action set up in the flow.
File path
Enter the full path of the file to move to the trash, including its name and extension, for example /Documentos/relatorio_antigo.pdf.
File ID
Enter the file ID in Google Drive. If provided, this ID is used instead of the path. You can get the ID, for example, from the id return of the Get file by name action.
Only search in "Shared with me"
Turn this on when the file was shared with the connected account instead of owned by it. The first part of the path is then looked up in Shared with me: /report.pdf points to a file shared directly with the account, and /Client folder/report.pdf to a file inside a shared folder. Default: off.
Drive name
Enter the name of the drive to reach. Leave it empty to use "My Drive".
Returns
This action has no returns.
Rules and Conditions
- The Drive connection field is required. Also fill in File path or File ID; without either, the robot stops the run with an error.
- When File ID is provided, the File path, Drive name and Only search in "Shared with me" fields are not used.
- The file can be restored with the Restore a File from the Trash action.
- To delete it permanently, use the Empty Trash action after moving it to the trash.
- With Only search in "Shared with me" on, the Drive name field is not used to find the first part of the path.
- On shared items, what the robot can do depends on the permission the owner gave the connected account. Without edit permission, Google Drive refuses the operation and the robot stops the run with an error.