Skip to main content
Roberty Studio
RPAFiles

Restore a file from trash

Restore a file from trash

Restores a file from the trash to its original place in Google Drive.


Options​

Drive connection​

Select the Connection action set up in the flow.

Previous folder path​

Enter the path the file had before it was moved 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 Previous folder path or File ID; without either, the robot stops the run with an error.
  • When File ID is provided, the Previous folder path, Drive name and Only search in "Shared with me" fields are not used.
  • The file must be in the trash to be restored.
  • If the original parent folder no longer exists, the restore may fail.
  • 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.