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. Specifically, the Bucket → Get Many operation retrieves a list of storage buckets within a specified Google Cloud project. This is useful for automating cloud resource management, auditing available storage, or integrating bucket listings into broader workflows.

Common scenarios:

  • Listing all storage buckets in a project for monitoring or reporting.
  • Filtering buckets by name prefix to find specific resources.
  • Integrating bucket inventory into automated provisioning or cleanup processes.

Example use cases:

  • Automatically generate a report of all buckets in a project every week.
  • Trigger downstream actions (e.g., notifications) if new buckets matching a certain prefix are detected.

Properties

Name Type Meaning
Authentication options Selects the authentication method: Service Account or OAuth2.
Project ID string The unique identifier of the Google Cloud project whose buckets will be listed.
Prefix string Optional filter to only return buckets whose names begin with this prefix.
Projection options Determines which set of properties to return: "All Properties" or "No ACL".
Return All boolean If true, returns all results; if false, limits the number of returned buckets (default: 1000 for "No ACL", 200 otherwise).

Output

The output is an array of JSON objects, each representing a Google Cloud Storage bucket. Each object typically includes fields such as:

{
  "kind": "storage#bucket",
  "id": "my-bucket",
  "selfLink": "https://www.googleapis.com/storage/v1/b/my-bucket",
  "projectNumber": "123456789",
  "name": "my-bucket",
  "timeCreated": "2023-01-01T00:00:00.000Z",
  "updated": "2023-01-02T00:00:00.000Z",
  // ...other bucket metadata depending on projection
}
  • The exact structure and included fields depend on the selected Projection property.
  • No binary data is returned by this operation.

Dependencies

  • Google Cloud Platform account with access to the relevant project.
  • API credentials:
    • Service Account key file (for Service Account authentication), or
    • OAuth2 credentials (for OAuth2 authentication).
  • The googleApi or googleCloudStorageOAuth2Api credential must be configured in n8n.
  • The Google Cloud Storage API must be enabled for your project.

Troubleshooting

Common issues:

  • Invalid or missing credentials: Ensure that the correct authentication method is selected and credentials are properly configured in n8n.
  • Insufficient permissions: The service account or OAuth2 user must have permission to list buckets in the specified project.
  • Incorrect Project ID: Double-check the Project ID for typos or incorrect values.
  • API not enabled: Make sure the Google Cloud Storage API is enabled in the Google Cloud Console.

Error messages:

  • "Request had insufficient authentication scopes": Update your credentials to include the necessary scopes.
  • "Project not found": Verify the Project ID and ensure your credentials have access.
  • "PERMISSION_DENIED": Check IAM roles and permissions for the authenticated user/service account.

Links and References

Discussion