Skip to content
Proud to collaborate with Microsoft for Startups

cloudflare.r2.create_bucket ​

Create a Cloudflare R2 bucket

Creates a Cloudflare R2 bucket.

R2 is S3-compatible object storage with zero egress fees. The bucket name must be globally unique across all R2 users.

Inputs:

  • bucket_name: Name of the R2 bucket (required). Must be globally unique.
  • connection_uuid: Cloud connection UUID for Cloudflare credentials (required).

Outputs (terminal state_data):

  • bucket_name: str — confirmed bucket name
  • bucket_endpoint: str — R2 endpoint URL for API access
  • public_url: str — public URL for accessing objects (if public)

Compensation: Use cloudflare.r2.delete_bucket to undo. Plugin required: context.get_plugin("cloudflare")

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-cloudflare
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
bucket_namestringYes—Name of the R2 bucket (globally unique)
connection_uuiduuidYes—Cloud connection UUID for Cloudflare credentials

Output Schema ​

FieldTypeRequiredDefaultDescription
bucket_endpointstringNo——
bucket_namestringNo——
public_urlstringNo——
connection_uuiduuidNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeCreate-bucket request accepted
completedNoYesYes—R2 bucket created
failedNoYesNo—R2 bucket creation failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedCreate R2 bucket
* (any state)failfailedMark workflow failed

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "cloudflare.r2.create_bucket",
  "initial_data": {
    "bucket_name": "value",
    "connection_uuid": "value"
  }
}