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 objects. Specifically, the Object → Get Many operation retrieves a list of objects (files) from a specified bucket, supporting advanced filtering and pagination options. This is useful for automating workflows that need to process, audit, or synchronize files stored in Google Cloud Storage.

Common scenarios:

  • Listing all files in a bucket for backup or migration.
  • Filtering files by prefix (e.g., only images or logs).
  • Paginating through large buckets to process files in batches.

Practical example:
You could use this node to fetch all .csv files from a "data-exports" bucket, then process each file in subsequent workflow steps.


Properties

Name Type Meaning
Authentication options Selects the authentication method: Service Account or OAuth2.
Bucket Name string The name of the Google Cloud Storage bucket to list objects from.
Projection options Determines which properties are returned: "All Properties" or "No ACL".
Return All boolean Whether to return all results or limit the number of results.
Limit number Maximum number of results to return (only shown if "Return All" is false).
Additional Parameters collection Extra filters for listing objects (see below for details).

Additional Parameters (collection):

  • Delimiter (string): Returns results in directory-like mode using this value as the delimiter.
  • End Offset (string): Filter results to names lexicographically before this value.
  • Include Trailing Delimiter (boolean): If true, objects will appear with exactly one instance of delimiter at the end of the name.
  • Prefix (string): Filter results to names that start with this value.
  • Start Offset (string): Filter results to names lexicographically equal or after this value.
  • Versions (boolean): If true, list all versions of objects as distinct entries.

Output

The output is an array of JSON objects, each representing an object (file) in the specified bucket. Each object typically includes fields such as:

{
  "kind": "storage#object",
  "id": "bucket-name/object-name",
  "selfLink": "https://www.googleapis.com/storage/v1/b/bucket-name/o/object-name",
  "name": "object-name",
  "bucket": "bucket-name",
  "generation": "1234567890",
  "metageneration": "1",
  "contentType": "text/plain",
  "timeCreated": "2023-01-01T00:00:00.000Z",
  "updated": "2023-01-01T00:00:00.000Z",
  "storageClass": "STANDARD",
  "size": "1024",
  "md5Hash": "base64==",
  "mediaLink": "https://storage.googleapis.com/download/storage/v1/b/bucket-name/o/object-name?alt=media",
  ...
}

Note: The exact fields depend on the selected "Projection" and any additional parameters.


Dependencies

  • Google Cloud Storage API: Requires access to a Google Cloud project with Storage enabled.
  • Authentication: You must provide either:
    • A Service Account credential (googleApi)
    • An OAuth2 credential (googleCloudStorageOAuth2Api)
  • n8n Configuration: Credentials must be set up in n8n's credentials section.

Troubleshooting

Common issues:

  • Invalid credentials: Ensure your Service Account or OAuth2 credentials have permission to list objects in the target bucket.
  • Bucket not found: Double-check the "Bucket Name" property for typos or missing buckets.
  • Insufficient permissions: The account used must have storage.objects.list permission on the bucket.
  • API quota exceeded: If you receive quota errors, check your Google Cloud project's API usage limits.

Error messages:

  • "error": "The caller does not have permission"
    Resolution: Grant the necessary IAM roles to your service account or user.
  • "error": "Not Found"
    Resolution: Verify the bucket exists and the name is correct.
  • "error": "Request had insufficient authentication scopes"
    Resolution: Make sure your OAuth2 scope includes https://www.googleapis.com/auth/devstorage.read_only or broader.

Links and References

Discussion