To interact with a Google® Cloud Storage bucket as part of a chain, add a step with a Google Cloud Storage connector command. For example:
- Create folders
- Download and upload files
- Delete, list, and move objects
To enable these commands, an IT admin first sets up a Google Cloud Storage connector.
Create folder
To create a directory in a Google Cloud Storage bucket, use a Create Folder command.
Equivalent API call: https://cloud.google.com/storage/docs/json_api/v1/folders/insert
Properties
Property |
Details |
Bucket |
Enter the Google Cloud Storage bucket to create the folder in. To use the connector's default bucket, leave blank. |
Object name |
Enter the name of the directory. |
Overwrite |
To replace another directory with Object name with the new folder, check this box |
Outputs
Output |
Output Type |
Object attributes |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Command fails to execute |
2 |
Error |
Error authenticating |
3 |
Warning |
The file downloaded is empty |
Delete object(s)
To delete objects from a Google Cloud Storage bucket, use a Delete Object(s) command.
Equivalent API call: https://cloud.google.com/storage/docs/json_api/v1/objects/delete
Properties
Property |
Details |
Bucket |
Enter the Google Cloud Storage bucket to delete objects from. To use the connector's default bucket, leave blank. |
Object name |
Enter the name of the objects to delete. |
Delete all matching objects |
To delete all objects with a prefix that matches Object name, check this box. |
Outputs
Output |
Output Type |
Objects deleted |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Command fails to execute |
2 |
Error |
Error authenticating |
3 |
Warning |
The file downloaded is empty |
Download file
To download the contents of a file in a Google Cloud Storage bucket, use a Download File command.
Equivalent API call: NA
Properties
Property |
Details |
Bucket |
Enter the Google Cloud Storage bucket to download from. To use the connector's default bucket, leave blank. |
Object name |
Enter the name of the file to download. |
Outputs
Output |
Output Type |
Object file |
File |
Object size (bytes) |
Integer |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Command fails to execute |
2 |
Error |
Error authenticating |
3 |
Warning |
The file downloaded is empty |
List objects
To list all objects that match a specified prefix from a Google Cloud Storage bucket, use a List Objects command.
Equivalent API call: https://cloud.google.com/storage/docs/json_api/v1/objects/list
Properties
Property |
Details |
Bucket |
Enter the Google Cloud Storage bucket to list objects in. To use the connector's default bucket, leave blank. |
Object(s) prefix |
Enter the prefix of the objects to list. |
Outputs
Output |
Output Type |
Objects |
File |
Number of objects |
Integer |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Command fails to execute |
2 |
Error |
Error authenticating |
3 |
Warning |
The file downloaded is empty |
Move/copy object
To move or copy an object to another location in a Google Cloud Storage bucket, use a List Objects command.
Equivalent API call: https://cloud.google.com/storage/docs/json_api/v1/objects/copy
Properties
Property |
Details |
Bucket |
Enter the Google Cloud Storage bucket to use. To use the connector's default bucket, leave blank. |
From object name |
Enter the name of the object to move or copy. |
To object name |
Enter the name of the directory to move or copy the object to. |
Keep original (copy) |
Select whether to move or copy the object:
- To move the object and not keep a version at the original location, clear this box.
- To keep the object at its original location and create a copy at the new location, check this box.
|
Outputs
Output |
Output Type |
Object attributes |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Command fails to execute |
2 |
Error |
Error authenticating |
3 |
Warning |
The file downloaded is empty |
Upload file
To upload a file to a directory in a Google Cloud Storage bucket, use an Upload File command.
Equivalent API call: https://cloud.google.com/storage/docs/json_api/v1/objects/insert
Properties
Property |
Details |
Bucket |
Enter the Google Cloud Storage bucket to upload to. To use the connector's default bucket, leave blank. |
Object name |
Enter the name of the directory to upload to. |
Overwrite |
To replace another file in the directory that has the same name as the uploaded file, check this box. |
File contents |
Enter the file or text to upload. |
Outputs
Output |
Output Type |
Object attributes |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Command fails to execute |
2 |
Error |
Error authenticating |
3 |
Warning |
The file downloaded is empty |