← Back to Home

How to Orchestrate Durable Cloudflare Workflows with Stage Chaining

Updated March 5, 2026
cloudflare workflowsorchestrationpipelineauto chainingd1

Orchestrating Durable Workflows

Use one workflow per stage and chain them with an explicit auto flag:

Stage Payload Contract

Pass these fields in every child trigger:

{
  videoId,
  auto,
  triggerSource: 'workflow',
  parentWorkflowId: workflowId
}

Run Persistence

Persist each workflow instance in workflow_runs:

await createWorkflowRun(db, { workflowId, stage: 'script', videoId, triggerSource, config: { auto } });
await markWorkflowRunRunning(db, workflowId);

Chaining Guardrails

Retry Strategy