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 objects (files) stored in Google Cloud Storage buckets.
With the Object → Get operation, you can retrieve a specific object from a bucket, either as metadata (JSON) or as the actual file data (binary).
This is useful for automating workflows that need to fetch files from cloud storage, such as:

  • Downloading and processing files uploaded by users.
  • Retrieving configuration or data files for further automation.
  • Integrating with other systems that require access to files stored in Google Cloud.

Example use cases:

  • Fetching a CSV file from a bucket and parsing its contents.
  • Downloading an image for further processing or sending via email.
  • Retrieving object metadata for auditing or reporting.

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 containing the object.
Object Name string The name (key) of the object (file) to retrieve from the bucket.
Projection options Determines which properties are returned: "All Properties" (full) or "No ACL" (noAcl).
Return Data options Specifies whether to return object metadata ("Metadata"/json) or the actual file data ("Object Data"/media).
Put Output File in Field string If returning binary data, specifies the output field name for the file.
Additional Parameters collection Optional parameters for advanced filtering and conditional retrieval (e.g., generation, metageneration).
Encryption Headers collection Optional encryption settings if the object is encrypted with a customer-supplied key.

Output

  • If "Return Data" is set to "Metadata":

    • The output will be a JSON object containing the object's metadata, such as name, size, contentType, updated date, etc.
    • Example:
      {
        "kind": "storage#object",
        "id": "bucket-name/object-name/1234567890",
        "selfLink": "...",
        "name": "object-name",
        "bucket": "bucket-name",
        "contentType": "text/plain",
        "size": "1024",
        ...
      }
      
  • If "Return Data" is set to "Object Data":

    • The output will include a binary property (default name: data or as specified in "Put Output File in Field") containing the file's raw data.
    • The JSON part may contain minimal metadata or just reference the binary field.

Dependencies

  • Google Cloud Storage API: Requires access to a Google Cloud project with the Storage API enabled.
  • Authentication:
    • Service Account: Requires a service account key with appropriate permissions.
    • OAuth2: Requires OAuth2 credentials with access to Google Cloud Storage.
  • n8n Credentials: You must configure either a Google API credential (Service Account) or Google Cloud Storage OAuth2 credential in n8n.

Troubleshooting

Common Issues:

  • Invalid Credentials: If authentication fails, ensure your credentials are correct and have the necessary permissions.
  • Object Not Found: If the specified object does not exist, you'll receive a "Not Found" error. Double-check the bucket and object names.
  • Permission Denied: Make sure the authenticated user/service account has permission to access the bucket and object.
  • Binary Output Issues: If "Return Data" is set to "Object Data" but no binary field is present, check that the object exists and is accessible, and that the "Put Output File in Field" value is valid.

Error Messages:

  • "error": "Not Found": The object or bucket does not exist.
  • "error": "Permission denied": Insufficient permissions for the requested operation.
  • "error": "Invalid encryption key": Provided encryption headers do not match the object's encryption.

How to resolve:

  • Verify all input fields, especially bucket and object names.
  • Check credentials and permissions in Google Cloud Console.
  • Ensure encryption keys (if used) are correct and properly base64-encoded.

Links and References

Discussion