Google Cloud Storage Enhanced icon

Google Cloud Storage Enhanced

Use the Google Cloud Storage API

Overview

The Google Cloud Storage Enhanced node allows you to interact with Google Cloud Storage buckets directly from your n8n workflows. Specifically, for the Bucket → Delete operation, this node enables you to delete a specified bucket in your Google Cloud project. This is useful for automating cloud resource management, such as cleaning up unused storage or managing environments dynamically.

Practical examples:

  • Automatically deleting temporary buckets after data processing jobs.
  • Cleaning up test or staging environments as part of CI/CD pipelines.
  • Enforcing retention policies by removing old or obsolete buckets.

Properties

Name Type Meaning
Authentication options Selects the authentication method: Service Account or OAuth2. Determines which credentials are used.
Bucket Name string The name of the bucket to be deleted. This is required for the delete operation.
Filters collection Optional filters to control deletion based on bucket metageneration:
- Metageneration Match (number): Only delete if the bucket's metageneration matches this value.
- Metageneration Exclude (number): Only delete if the bucket's metageneration does not match this value.

Output

  • json:
    • On success, the output will be an empty object {} indicating the bucket was deleted successfully.
    • On failure (if "Continue On Fail" is enabled), the output will contain an error field with the error message:
      {
        "error": "Error message here"
      }
      

Dependencies

  • External Services: Requires access to the Google Cloud Storage API.
  • Authentication: You must provide either:
    • A Google Service Account credential (googleApi), or
    • An OAuth2 credential (googleCloudStorageOAuth2Api).
  • n8n Configuration: Ensure that the appropriate credentials are set up in n8n under the node’s credential options.

Troubleshooting

Common Issues:

  • Insufficient Permissions: If the credentials do not have permission to delete the bucket, you may receive a permissions error.
  • Bucket Not Found: If the specified bucket does not exist, an error will be returned.
  • Metageneration Mismatch: If you use the Metageneration Match/Exclude filters and the condition is not met, the bucket will not be deleted and an error will be thrown.

Common Error Messages:

  • "The caller does not have permission": Check your credentials and IAM roles.
  • "Not Found": Verify the bucket name is correct and exists.
  • "Precondition Failed": Indicates a metageneration mismatch; check your filter values.

Links and References

Discussion