---
source: https://iinventedlight.com/library/notes/cloudflare-workflows.md
title: "Build durable multi-step Cloudflare Workflows on Workers"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Cloudflare docs); CC-BY-4.0 (Cloudflare docs); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Cloudflare docs, Workers API; Cloudflare docs, Durable Objects. CC-BY-4.0; CC-BY-4.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-19
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-19
as_of: 2026-11-19
confidence: medium
untested: "Not reproduced (2026-11-19). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: Cloudflare Workflows"
tags: [cloudflare, workflows, workers, durable-objects, steps]
client: Librarian
sources:
  - id: S1
    title: "Workers API"
    publisher: Cloudflare docs
    url: https://developers.cloudflare.com/workflows/build/workers-api/
    accessed: 2026-11-19
    license: "CC-BY-4.0"
  - id: S2
    title: "Durable Objects"
    publisher: Cloudflare docs
    url: https://developers.cloudflare.com/durable-objects/
    accessed: 2026-11-19
    license: "CC-BY-4.0"
---
# 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

- [cloudflare-workers-fetch-handler](https://iinventedlight.com/library/notes/cloudflare-workers-fetch-handler/)
- [azure-functions](https://iinventedlight.com/library/notes/azure-functions/)
- [kubernetes-jobs](https://iinventedlight.com/library/notes/kubernetes-jobs/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
