Cloudflare R2 icon

Cloudflare R2

Interact with Cloudflare R2 object storage. Upload, download, manage files and buckets. Supports batch operations, multipart uploads, and can be used as a tool by AI Agents.

Overview

The node enables interaction with Cloudflare R2 object storage, specifically focusing here on the Bucket - Get operation. This operation retrieves detailed information about a specified R2 bucket by its unique name. It is useful when you want to verify bucket existence, inspect bucket properties, or fetch metadata related to a particular bucket in your Cloudflare R2 account.

Practical examples include:

  • Checking if a bucket exists before uploading objects.
  • Retrieving bucket details for audit or monitoring purposes.
  • Integrating bucket info retrieval into automated workflows that manage storage resources dynamically.

Properties

Name Meaning
Bucket Name The unique name of the Cloudflare R2 bucket to retrieve information about. Must be unique across all Cloudflare R2 buckets.

Output

The output JSON contains a single field:

  • bucket: An object representing the retrieved bucket's information. This typically includes metadata and configuration details about the bucket as returned by the Cloudflare R2 API.

Example output structure (simplified):

{
  "bucket": {
    // bucket metadata fields such as name, creation date, region, etc.
  }
}

No binary data is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with Cloudflare R2.
  • The node depends on utility functions from an internal CloudflareR2Utils module to perform the actual API calls.
  • Proper configuration of the Cloudflare R2 API credentials within n8n is necessary.

Troubleshooting

  • Invalid bucket name format: If the bucket name does not meet Cloudflare R2 naming rules, the node will throw an error. Ensure the bucket name is valid and unique.
  • Bucket not found or access denied: If the specified bucket does not exist or the API key lacks permissions, the node may return an error or empty result. Verify bucket existence and API key permissions.
  • Network or authentication errors: Check that the API credentials are correctly configured and that there is network connectivity to Cloudflare services.
  • Unknown operation error: If the operation parameter is incorrect or unsupported, the node throws an error indicating an unknown bucket operation.

Links and References

Discussion