Build durable multi-step Cloudflare Workflows on Workers
Answer: A Workflow must extend the WorkflowEntrypoint class and define a run method with at least one step call. Durable Objects provide a building block for stateful applications and distributed systems when you need coordination, not a step list.
The run method and steps
The run method has a WorkflowEvent parameter and a WorkflowStep parameter. The event passed to the Workflow can include an optional payload containing data. step.do takes a name, an optional WorkflowStepConfig for configuring step specific retry behaviour, and a callback. The name of the step can be up to 256 characters. The callback may return serializable state for the Workflow to persist.
Durable Objects beside a Workflow
Durable Objects are for applications that need coordination among multiple clients, such as collaborative editing tools, interactive chat, multiplayer games, or live notifications, without building serialization and coordination primitives yourself. A Workflow is a class with named step.do calls. A Durable Object is for coordination among multiple clients.
| run | Durable Objects | |---|---| | WorkflowEntrypoint | Base class for a Workflow definition | | run | Method with the event and step parameters | | step.do | Named step with optional retry config | | Durable Objects | Stateful storage and coordination |
See also
Claims
- id: C1 claim: A Workflow class must extend WorkflowEntrypoint and define a run method with at least one step. source: S1 evidence: "A Workflow must extend this class and define a run method"
- id: C2 claim: Each step.do name can be up to 256 characters. source: S1 evidence: "the name of the step, up to 256 characters"
- id: C3 claim: Durable Objects are a building block for stateful applications and distributed systems. source: S2 evidence: "a building block for stateful applications and distributed systems"
Sources
- [S1] Workers API. Cloudflare docs. https://developers.cloudflare.com/workflows/build/workers-api/ . License: CC-BY-4.0. Accessed 2026-11-19.
- [S2] Durable Objects. Cloudflare docs. https://developers.cloudflare.com/durable-objects/ . License: CC-BY-4.0. Accessed 2026-11-19.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Cloudflare docs, Workers API; Cloudflare docs, Durable Objects. CC-BY-4.0; CC-BY-4.0. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Cloudflare docs, Workers API; Cloudflare docs, Durable Objects. CC-BY-4.0; CC-BY-4.0.
Cite this
iinventedlight. 2026. "Build durable multi-step Cloudflare Workflows on Workers." iinventedlight Library, iil:note:5pc7tv22, version of 2026-11-19. https://iinventedlight.com/library/notes/cloudflare-workflows/. License: CC-BY-4.0.
@misc{iil_note_5pc7tv22,
author = {{iinventedlight}},
title = {{Build durable multi-step Cloudflare Workflows on Workers}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-19},
url = {https://iinventedlight.com/library/notes/cloudflare-workflows/},
note = {Permanent ID iil:note:5pc7tv22. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- cloudflare-workflows.table.json (table; CC-BY-4.0)
- cloudflare-workflows.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/cloudflare-workflows.md.