GCP Storage: Put Node

The GCP Storage: Put Node allows a workflow to upload a file into a Google Cloud Storage bucket.

GCP Storage: Put Node

Node Properties

There are several configuration parameters for the GCP Storage: Put Node …

Google Cloud Configuration

First, we must enter our Google Cloud Storage credentials.

GCP Storage: Put Node Credentials

  • Account Key Method: This may be supplied as either a JSON template or a payload path.
  • Account Key: An account key that has access to the bucket that will be receiving the upload.

Note: We recommend that you create a service account key specifically for use in Losant workflows that has appropriate access to relevant storage buckets.

File Configuration

Next, we enter the basic details of the file we will be uploading. All applicable fields are templatable.

GCP Storage: Put Node Config

  • Bucket Name: (Required) The name of the bucket that will receive the file upload.
  • File Name: (Required) The name of the file to upload.
  • File Encoding: (Required) The encoding of the data being uploaded. Defaults to UTF-8.
  • Content Type: (Required) MIME type of the data being uploaded.

File Contents

There are two Input Modes available to enter the contents of your file. Both are templatable:

GCP Storage: Put Node File Content

  • File Content Template: The content of the file to upload. If left blank, your configured file will be uploaded without any content.

GCP Storage: Put Node File URL

  • File URL Template: The URL where the file you wish to upload can be found. This option is useful when using the Temporary URL Output option in a notebook. Note that this field is required if “File URL Template” is selected as the Input Mode.

Output

GCP Storage: Put Node Output

The success or failure of the operation can optionally be placed at the specified payload path. The result is an object with a success property of true or false. In the false case, the result object will also contain an error key, whose value is an object describing the nature of the error.

Node Example

The following is an example of a successful operation:

{
  "success": true
}

Node Errors

The following is an example of a failed operation:

{
  "success": false,
  "error": "Access Denied"
}

Was this page helpful?


Still looking for help? You can also search the Losant Forums or submit your question there.