Skip to main content
Roberty Studio
RPAFolders

Move folder

Move folder

Moves a folder to a new destination within Google Drive.


Options​

Drive connection​

Select the Connection action set up in the flow.

Move folder​

Enter the full path of the folder to move, for example /Documentos/Relatórios.

Folder ID​

Enter the folder 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 folder by name action.

Destination path​

Enter the path of the destination folder, for example /Arquivo/2026. Use / to move it to the root of the drive.

Destination folder ID​

Enter the destination folder ID in Google Drive. If provided, this ID is used instead of the destination path. You can get the ID, for example, from the id return of the Get folder by name action.

Only search destination in "Shared with me"​

Turn this on when the destination folder was shared with the connected account. The first folder of the new path is then looked up in Shared with me, for example /Client folder/2026. Together with the Only search in "Shared with me" option, it lets you move items from My Drive into a shared folder and back. Default: off.

Create folders if they don't exist in the path​

When enabled, it automatically creates every folder of the path that does not exist yet. Default: disabled.

Only search in "Shared with me"​

Turn this on when the folder 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: /Client folder points to a folder shared directly with the account, and /Client folder/2026 to one of its subfolders. Default: off.

Drive name​

Enter the name of the drive to reach. Leave it empty to use "My Drive".

Returns​

Javascript code​

js
actions["action-id"].newParentId // identifier of the new parent folder (Text)

Field selection​

  • newParentId — unique identifier of the destination parent folder (Text)

Rules and Conditions​

  • The Drive connection field is required. Also fill in Move folder or Folder ID, and Destination path or Destination folder ID; if either is missing, the robot stops the run with an error.
  • When Folder ID is provided, the Move folder and Only search in "Shared with me" fields are not used.
  • When Destination folder ID is provided, the Destination path, Only search destination in "Shared with me" and Create folders if they don't exist in the path fields are not used.
  • If Create folders if they don't exist in the path is disabled and the destination does not exist, the robot stops with an error.
  • With Only search in "Shared with me" on, the Drive name field is not used to find the first part of the path.
  • With Only search destination in "Shared with me" on, the Drive name field is not used to find the first folder of the new path, and the new path must include at least the shared folder — / stops the run with an error.
  • Create folders if they don't exist in the path does not create the shared folder: if the first folder of the path is not in Shared with me, it is created in the selected drive.
  • 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.