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.
Actions15
- Bucket Actions
- Object Actions
- Batch Operations Actions
Overview
This node enables interaction with Cloudflare R2 object storage, specifically focusing here on the Copy operation for objects. It allows users to copy an object from one location to another within the same bucket or between different buckets in Cloudflare R2.
Typical use cases include:
- Duplicating files within a bucket for backup or versioning purposes.
- Moving or copying files between buckets to organize data or separate environments.
- Automating file management workflows where objects need to be replicated.
For example, you might copy an image file from a source bucket to a destination bucket under a new key (path/filename), enabling easy content distribution or archival.
Properties
| Name | Meaning |
|---|---|
| Bucket Name | The name of the destination R2 bucket where the object will be copied to. |
| Source Bucket | (Optional) The name of the source bucket if different from the destination bucket. |
| Source Key | The key (path and filename) of the source object to copy. |
| Destination Key | The key (path and filename) for the copied object in the destination bucket. |
Output
The output JSON contains:
success: A boolean indicating whether the copy operation was initiated successfully.message: A string message describing the copy action performed, including source and destination paths.
Note: The actual copy functionality is marked as "not fully implemented" in the code, so this node currently returns a success message without performing the real copy.
Example output:
{
"success": true,
"message": "Copy from sourceBucket/sourceKey to destinationBucket/destinationKey (not fully implemented)"
}
No binary data output is produced by this operation.
Dependencies
- Requires an API authentication credential for Cloudflare R2.
- Relies on utility functions from a bundled helper module for Cloudflare R2 operations.
- Needs proper configuration of the Cloudflare R2 API credentials in n8n.
Troubleshooting
- Invalid bucket or object key names: The node validates bucket and object key formats; invalid names will cause errors.
- Operation not implemented: The copy operation currently only simulates success and does not perform the actual copy. Users expecting real copy functionality should be aware of this limitation.
- Missing required parameters: Ensure that
Source KeyandDestination Keyare provided; otherwise, the node will throw errors. - Cross-bucket copy issues: If
Source Bucketis omitted, it defaults to the destination bucket. Make sure this matches your intended source.
Common error messages:
"Unknown object operation: copy"— indicates an unsupported operation name."Invalid object key format"— means the provided object key does not meet expected naming rules.