To interact with Google Drive® as part of a chain, add a step with a Google Drive connection command. For example:
- Upload, download, move, search, and delete files
- Create and delete folders
To enable these commands, an IT admin first sets up a Google Drive connector.
Note: These commands manage files stored in Google Drive, not files saved in Google Workspace® products such as Google Docs®, Sheets®, or Slides®.
Create folder
To create a new folder in Google Drive, use a Create folder command.
Properties
Property |
Detail |
Folder name |
Enter the name of the folder to create. |
Parent folder |
Enter the name of the parent folder to create the new folder in. To create the folder at the top level, leave blank. |
Outputs
None
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
General failure |
2 |
Error |
Invalid arguments |
3 |
Error |
Multiple files found with the given name |
4 |
Error |
Error deleting; requested object is a folder |
10 |
Error |
Error response from Google Drive API |
Delete file
To delete a file from Google Drive, use a Delete file command.
Properties
Property |
Detail |
File name |
Enter the name of the file to delete. |
Outputs
None
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
General failure |
2 |
Error |
Invalid arguments |
3 |
Error |
Multiple files found with the given name |
4 |
Error |
Error deleting; requested object is a folder |
10 |
Error |
Error response from Google Drive API |
Download file
To download a file from Google Drive, use a Download file command.
Properties
Property |
Detail |
File name |
Enter the name of the file to download. |
Folder name |
Enter the name of the parent folder to download the file from. |
Download path |
Enter the path to where to store the file. To use the file as an output, leave blank. |
Overwrite |
To download the file regardless of whether a file with the same name exists at the path, check this box |
Outputs
Output |
Output Type |
File |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
General failure |
2 |
Error |
Invalid arguments |
3 |
Error |
Multiple files found with the given name |
4 |
Error |
Error deleting; requested object is a folder |
10 |
Error |
Error response from Google Drive API |
Move file
To move a file to a new folder in Google Drive, use a Move file command.
Properties
Property |
Detail |
File name |
Enter the name of the file to move. |
Folder name |
Enter the name of the folder to move the file to. |
Overwrite |
To move the file to the new folder regardless of whether it already contains a file with the same name, check this box. |
Outputs
None
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
General failure |
2 |
Error |
Invalid arguments |
3 |
Error |
Multiple files found with the given name |
4 |
Error |
Error deleting; requested object is a folder |
10 |
Error |
Error response from Google Drive API |
16 |
Error |
Couldn't write the destination file because another file with the same name exists |
Search files
To search for files in Google Drive according to a specified query, use a Search files command.
Properties
Property |
Detail |
Query |
Enter the search parameters, in the Google Drive-supported query language. |
Number of results |
Enter the maximum number of results to display, up to 100. |
Order |
Select the field to sort the returned files on. |
Outputs
Output |
Output Type |
Files |
JSON |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
General failure |
2 |
Error |
Invalid arguments |
3 |
Error |
Multiple files found with the given name |
4 |
Error |
Error deleting; requested object is a folder |
10 |
Error |
Error response from Google Drive API |
16 |
Error |
Couldn't write the destination file because another file with the same name exists |
Upload file
To upload a file to Google Drive, use an Upload file command.
Properties
Property |
Detail |
File name |
Enter the name of the file to upload. This can be an existing file on your file system, a command output, or a file resource. |
Folder name |
Enter the name of the folder to upload the file to in Google Drive. To upload the file to the top level, leave blank. |
Upload name |
Enter the name of the file upon upload. To use the same name as File Name, leave blank. |
Overwrite |
To upload the file regardless of whether a file with the same name exists at the specified location, check this box. |
Outputs
Output |
Output Type |
File Name |
String |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
General failure |
2 |
Error |
Invalid arguments |
3 |
Error |
Multiple files found with the given name |
4 |
Error |
Error deleting; requested object is a folder |
10 |
Error |
Error response from Google Drive API |