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.
Create Folder
Creates a new folder in Google Drive
Inputs
Input |
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
Deletes a file from Google Drive
Inputs
Input |
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
Downloads a file from Google Drive
Inputs
Input |
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. To search the entire drive for the file, leave blank. |
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
Moves a file to a new folder in Google Drive
Inputs
Input |
Detail |
File Name |
Enter the name of the file in Google Drive to move |
Folder Name |
Enter the name of the parent 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
Searches for files in Google Drive according to a specified query
Inputs
Input |
Detail |
Query |
Enter the search parameters, in the Google Drive-supported query language |
Number of Results |
Enter the maximum number of results to display; maximum of 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
Uploads a file to Google Drive
Inputs
Input |
Detail |
File Name |
Enter the name of the file to upload. 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 the File Name input, 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 |