Bucket → Get Many
AI-generatedOverview
The node interacts with Google Cloud Storage, specifically managing buckets and objects within those buckets. For the Bucket - Get Many operation, it retrieves multiple storage buckets from a Google Cloud project. This is useful when you want to list all or filtered buckets in your cloud storage environment for management, reporting, or automation purposes.
Common scenarios include:
- Automating inventory of all storage buckets in a project.
- Filtering buckets by prefix to find specific groups of buckets.
- Retrieving bucket metadata for auditing or monitoring.
- Integrating bucket lists into workflows that manage data lifecycle or permissions.
Example: You might use this node to fetch all buckets starting with "prod-" to apply a policy update only to production buckets.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method to authenticate with Google Cloud Storage API. Options: Service Account, OAuth2. |
| Project ID | The Google Cloud project identifier where the buckets reside. |
| Prefix | Optional string to filter bucket names that start with this prefix. |
| Projection | Level of detail returned about each bucket. Options: All Properties (full), No ACL (noAcl). |
| Return All | Boolean flag indicating whether to return all matching buckets or limit the number of results. |
Output
The output is an array of JSON objects representing buckets retrieved from the Google Cloud Storage project. Each object contains bucket metadata according to the selected projection level:
- If
Projectionis set to All Properties, the output includes full bucket details such as ACLs, billing info, lifecycle rules, labels, retention policies, versioning, website configuration, and more. - If set to No ACL, the output excludes access control list details, providing a lighter response.
The output does not include binary data for this operation.
Example output snippet (simplified):
[
{
"id": "bucket-1",
"name": "my-bucket-1",
"location": "US",
"storageClass": "STANDARD",
"versioning": { "enabled": true },
"labels": { "env": "prod" }
},
{
"id": "bucket-2",
"name": "my-bucket-2",
"location": "EU",
"storageClass": "NEARLINE"
}
]
Dependencies
- Requires valid authentication credentials for Google Cloud Storage API via either:
- A service account credential with appropriate permissions.
- OAuth2 authentication token authorized for the target project.
- The node uses Google Cloud Storage REST API endpoints.
- Properly configured n8n credentials for Google API access are necessary.
Troubleshooting
- Authentication errors: Ensure the provided credentials have sufficient permissions to list buckets in the specified project.
- Invalid Project ID: Verify the project ID is correct and accessible by the authenticated user.
- Empty results: If no buckets are returned, check if the prefix filter is too restrictive or if the project actually contains buckets.
- API quota limits: Large projects with many buckets may hit API rate limits; consider enabling
Return Allcarefully or applying filters. - Projection parameter issues: Using incompatible projection values may cause unexpected responses; default to "No ACL" if unsure.