Skip to main content
Roberty Studio
RPAFiles

Upload file

Upload file

Uploads a local file to a specific path in Google Drive.


Options​

Drive connection​

Select the Connection action set up in the flow.

Path on Drive where the file will be saved​

Enter the full destination path in Google Drive, including the file name and extension, for example /Documentos/relatorio.pdf.

File path to upload​

Enter the full path of the local file to upload, for example C:\Relatorios\relatorio.pdf.

Only search in "Shared with me"​

Turn this on to upload the file into a folder shared with the connected account. The first folder of the path is then looked up in Shared with me, for example /Client folder/report.pdf. Default: off.

Drive name​

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

Returns​

Javascript code​

js
actions["action-id"].id // unique identifier of the file created in the Drive (Text)

Field selection​

  • id — unique identifier of the file created in Google Drive (Text)

Rules and Conditions​

  • The Drive connection, Path on Drive where the file will be saved and File path to upload fields are required.
  • The local file must exist and be reachable by the robot.
  • If any folder of the destination path 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 in "Shared with me" on, the path must include the shared folder before the file name; a path with only the file name stops the run with an error.
  • 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.