The Google Storage component enables integration with the Google Cloud Storage service, facilitating the storage and retrieval of objects in Google Cloud buckets. As a connector, it can be configured to perform file uploads, list objects, and remove items from buckets. The integration supports sending different types of files, as well as allowing header customization, overwrite control, and error handling.
URI syntax: google-storage:bucketName
Path parameters
Name | Description | Default | Type |
|---|---|---|---|
bucketName (common) | (required) Bucket name or ARN. | — | String |
Query parameters
Name | Description | Default | Type |
|---|---|---|---|
serviceAccountKey (common) | The service account key that can be used as a credential for the Storage client. It can be loaded from classpath, file or URL. | — | String |
objectName (producer) | Object name within the bucket. | — | String |
operation (producer) | Defines the operation for the producer. Possible values: copyObject, listObjects, deleteObject, deleteBucket, listBuckets, getObject, createDownloadLink. | — | GoogleCloudStorageOperations |
IMPORTANTBefore executing the integration flow, import the Google Cloud service account key to a config map. This key will be used as a resource in the integration:
The "key.json" file contains the service account credentials in JSON format. In Integrations, this key will be configured as a Resource file.
Read more about Resources files.
The flow below publishes a file to the sensedia-test-bucket bucket with the content sent in the integration payload. See the step-by-step:
The flow starts with a POST request on the /google-storage endpoint.
Then it logs the received content, showing the payload: got body ${body}.
Next, it uploads to Google Cloud Storage:
sensedia-test-bucketmyfile.txtkey.json (Google Cloud service account key)Finally, it sets the JSON response. The body is changed to {"success": true}.

NOTEAfter upload,
setBodyis used to set the request response, as the body returned by thegoogle-storagecomponent is of typecom.google.cloud.storage.Blob, which is not compatible with JSON serialization (not jackson-friendly).Alternatively, you can extract specific properties from the Java object using simple language:. In the example, only the file name is captured and returned in the response:
As a result of the integration, the file myfile.txt is available:

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more