Cloudflare R2 + Transloadit
Move files between Cloudflare R2 and Transloadit with the dedicated R2 import and store Robots, while keeping S3 credentials in Template Credentials.
Executable recipe
Build the integration
This Template imports an image from R2, optimizes it, and writes the result back under processed/.
- Create an R2 bucket and a bucket-scoped Object Read & Write API token.
- Save the R2 S3 values as Template Credentials named my_r2_credentials.
- Paste the Instructions into a Template and start an Assembly from that Template.
Template Instructions
{
"steps": {
"imported": {
"robot": "/cloudflare/import",
"credentials": "my_r2_credentials",
"path": "incoming/photo.jpg"
},
"optimized": {
"robot": "/image/optimize",
"use": "imported"
},
"exported": {
"robot": "/cloudflare/store",
"use": "optimized",
"credentials": "my_r2_credentials",
"path": "processed/${file.url_name}"
}
}
}Authentication
- Create an R2 API token with Object Read & Write access and scope it to the bucket used by the workflow.
- Save the bucket, S3 endpoint, Access Key ID, and Secret Access Key as Transloadit Template Credentials.
- Use the endpoint shown by Cloudflare, including the jurisdiction-specific hostname when the bucket uses a jurisdiction.
Limitations and operational notes
- R2 bucket access and public delivery are separate concerns. Configure a custom domain or public bucket in Cloudflare when results must be public.
- Non-recursive directory imports only read direct descendants. Set recursive explicitly for deeper prefixes and plan pagination for large buckets.
- Cloudflare shows an R2 Secret Access Key only when the token is created, so store it securely before leaving that screen.
More integrations
Continue building your stack
Amazon S3
Import from and export to Amazon S3 with dedicated Robots.
Supabase
Connect Supabase Storage through its S3-compatible endpoint.
Tigris
Import and export Tigris objects with first-class Robots.
Azure Blob Storage
Connect Azure Blob Storage containers to Assembly pipelines.