← All notes

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

Sources

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

Permanent ID: iil:note:5pc7tv22

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.},
}

Markdown

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.

All artifact files (JSON index)

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.