Google Cloud Storage Enhanced icon

Google Cloud Storage Enhanced

Use the Google Cloud Storage API

Overview

The Google Cloud Storage Enhanced node for n8n allows you to interact with Google Cloud Storage buckets and objects. Specifically, the Bucket → Create operation enables users to create new storage buckets in their Google Cloud projects with fine-grained control over access, configuration, and metadata.

Common scenarios:

  • Automating the creation of buckets for data archiving or backup workflows.
  • Setting up buckets with specific access controls and lifecycle policies as part of a deployment pipeline.
  • Creating buckets with custom configurations (e.g., CORS, encryption, labels) for application-specific needs.

Practical example:
A company wants to automatically provision a new bucket for each client project, applying predefined access controls, setting up region and storage class, and enabling object retention for compliance.


Properties

Name Type Meaning
Authentication options Selects the authentication method: Service Account or OAuth2.
Project ID string The Google Cloud project identifier where the bucket will be created.
Bucket Name string The name for the new bucket. Must be unique within Google Cloud Storage.
Projection options Determines which properties are returned in the response (All Properties or No ACL).
Predefined Access Control collection Allows selection of predefined ACLs and default object ACLs for the bucket.
Additional Parameters collection Advanced configuration for the bucket, such as billing, CORS, encryption, IAM, labels, location, etc.
Enable Object Retention boolean Whether to permanently enable object retention for this bucket (for regulatory/compliance requirements).

Details on "Additional Parameters" subfields:

  • Access Control: Custom JSON array for bucket-level access controls.
  • Billing: Billing configuration for the bucket.
  • CORS: Cross-Origin Resource Sharing settings.
  • Custom Placement Config: Region(s) configuration for the bucket.
  • Data Locations: List of regions for dual-region buckets.
  • Default Event Based Hold: Automatically apply event-based hold to new objects.
  • Default Object ACL: Default access controls for new objects.
  • Encryption: Encryption configuration.
  • IAM Configuration: Identity and Access Management settings.
  • Labels: Key/value pairs for organizing buckets.
  • Lifecycle: Lifecycle rules for automatic management of objects.
  • Location: Physical location/region for the bucket.
  • Logging: Logging configuration.
  • Retention Policy: Data retention policy.
  • Recovery Point Objective: RPO setting for the bucket.
  • Storage Class: Default storage class for objects.
  • Versioning: Versioning configuration.
  • Website: Website hosting configuration.

Output

The output is a JSON object representing the newly created bucket, including all its properties as returned by the Google Cloud Storage API. Typical fields include:

{
  "kind": "storage#bucket",
  "id": "my-bucket",
  "selfLink": "...",
  "projectNumber": "...",
  "name": "my-bucket",
  "timeCreated": "...",
  "location": "US",
  "storageClass": "STANDARD",
  "labels": { ... },
  "iamConfiguration": { ... },
  ...
}
  • The structure and included fields depend on the selected projection and provided parameters.
  • If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.

Dependencies

  • Google Cloud Platform account with appropriate permissions to create buckets.
  • API Credentials:
    • Service Account credentials (JSON key file) or
    • OAuth2 credentials configured in n8n.
  • n8n Credentials:
    • googleApi (for Service Account)
    • googleCloudStorageOAuth2Api (for OAuth2)

Troubleshooting

Common issues:

  • Invalid credentials: Ensure that the correct authentication method and credentials are set up in n8n.
  • Insufficient permissions: The service account or OAuth2 user must have permission to create buckets in the specified project.
  • Bucket name already exists: Bucket names must be globally unique across Google Cloud Storage.
  • Invalid parameter values: Incorrect JSON formatting in advanced fields (like CORS, IAM, etc.) can cause errors.

Error messages:

  • "Required parameter: projectId": Make sure the Project ID is provided and valid.
  • "Bucket name already exists": Choose a unique bucket name.
  • "Permission denied": Check IAM roles and permissions for the credentials used.
  • "Invalid value for field ...": Review the input for typos or incorrect formats, especially in JSON fields.

Links and References

Discussion