Actions9
Overview
This node integrates with Cloudflare R2, a scalable object storage service compatible with the S3 API. Specifically, the "Download" operation under the "Object" resource allows users to download an object stored in a specified R2 bucket.
Typical use cases include:
- Retrieving files or assets stored in Cloudflare R2 for further processing or delivery.
- Automating workflows that require fetching binary data from cloud storage.
- Integrating R2 object retrieval into larger automation pipelines, such as content management or backup systems.
For example, a user might configure this node to download an image file from a specific bucket and then pass it to another node for image processing or upload it elsewhere.
Properties
| Name | Meaning |
|---|---|
| Bucket Name | The name of the Cloudflare R2 bucket where the object is stored. |
| Object Key | The key (path) identifying the object within the bucket to download. |
| Binary Property | The name of the binary property in which the downloaded data will be stored in the output. |
Output
The node outputs JSON data containing metadata about the downloaded object, including:
bucket: The bucket name from which the object was downloaded.key: The object key (path).contentType: The MIME type of the downloaded object.contentLength: The size of the object in bytes.lastModified: Timestamp string indicating when the object was last modified.etag: The entity tag (ETag) of the object, useful for cache validation.
Additionally, the node outputs the actual binary data of the object under the specified binary property name (default "data"). This binary data can be used by subsequent nodes that accept binary inputs.
Dependencies
- Requires valid Cloudflare API credentials configured with "R2 S3-Compatible" authentication mode.
- Uses AWS SDK v3 S3 client configured with Cloudflare R2 endpoint and credentials.
- The node internally signs requests using AWS Signature Version 4 adapted for Cloudflare R2.
- Requires network access to the Cloudflare R2 endpoint corresponding to the user's account and jurisdiction.
Troubleshooting
Missing or Invalid Credentials: If the R2 Access Key ID, Secret Access Key, or endpoint are missing or incorrect, the node throws an error indicating invalid R2 credentials. Ensure the Cloudflare API credentials are correctly set with the "R2 S3-Compatible" auth mode and all required keys are provided.
Bucket Not Found: If the specified bucket does not exist or is inaccessible, the request will fail. Verify the bucket name and permissions.
Object Not Found: If the object key does not exist in the bucket, the node will throw an error. Confirm the object key is correct.
Binary Data Handling: Ensure the binary property name matches the property containing the binary data in the input/output. Mismatches may cause data not to be found or written incorrectly.
Network Issues: Connectivity problems to the Cloudflare R2 endpoint will result in request failures. Check network settings and firewall rules.
Links and References
- Cloudflare R2 Documentation
- AWS SDK for JavaScript v3 - S3 Client
- AWS Signature Version 4 Signing Process
- n8n Documentation on Binary Data
This summary is based on static analysis of the provided source code and input property definitions. It focuses on the "Object" resource and "Download" operation of the Cloudflare R2 node.