Complete knowledge domain for Cloudflare Workflows - durable execution framework for building multi-step applications on Workers that automatically retry, persist state, and run for hours or days. Use when: creating long-running workflows, implementing retry logic, building event-driven processes, scheduling multi-step tasks, coordinating between APIs, or encountering "NonRetryableError", "I/O context", "workflow execution failed", "serialization error", or "WorkflowEvent not found" errors. Keywords: cloudflare workflows, workflows workers, durable execution, workflow step, WorkflowEntrypoint, step.do, step.sleep, workflow retries, NonRetryableError, workflow state, wrangler workflows, workflow events, long-running tasks, step.sleepUntil, step.waitForEvent, workflow bindings
Status: Production Ready ✅ Last Updated: 2025-10-22 Production Tested: Yes
Primary Keywords:
Secondary Keywords:
Error-Based Keywords:
Framework Keywords:
This skill provides complete, production-ready knowledge for Cloudflare Workflows - a durable execution framework for building multi-step applications on Workers that:
Use this skill when:
This skill prevents 5 documented errors with sources:
| Error | Issue | Prevention | Source |
|-------|-------|------------|--------|
| I/O Context | Cannot perform I/O on behalf of different request | All I/O inside step.do() callbacks | Platform limitation |
| NonRetryableError Dev/Prod | Different behavior in dev vs production | Always provide error message | workers-sdk#10113 |
| WorkflowEvent Import | Export not found from cloudflare:workers | Use latest @cloudflare/workers-types | Package versioning |
| Serialization | Non-serializable return values fail | Only return JSON-compatible types | Workflows docs |
| CI Testing | Tests fail in CI but pass locally | Increase timeouts, add retries | workers-sdk#10600 |
Error Prevention: 5/5 = 100%
| Metric | Manual Setup | With Skill | Savings | |--------|--------------|------------|---------| | Tokens | ~15,000 | ~5,000 | ~67% | | Errors | 2-3 common issues | 0 (all prevented) | 100% | | Build Time | 3-4 hours (trial & error) | 30-45 minutes | ~75% |
Why the savings:
WorkflowEntrypoint APIdo, sleep, sleepUntil, waitForEventCreate a workflow:
import { WorkflowEntrypoint, WorkflowStep, WorkflowEvent } from 'cloudflare:workers';
export class MyWorkflow extends WorkflowEntrypoint<Env, Params> {
async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
// Step 1: Do work (auto-retries on failure)
const data = await step.do('fetch data', async () => {
const response = await fetch('https://api.example.com/data');
return await response.json();
});
// Step 2: Wait before next action
await step.sleep('wait 1 hour', '1 hour');
// Step 3: Continue workflow
await step.do('process data', async () => {
// Process data
return { processed: true };
});
return { status: 'complete' };
}
}
Trigger from Worker:
const instance = await env.MY_WORKFLOW.create({
params: { userId: '123' }
});
const status = await instance.status();
✅ Use Workflows when:
❌ Don't use Workflows when:
{
"devDependencies": {
"wrangler": "^4.44.0",
"@cloudflare/workers-types": "^4.20251014.0",
"typescript": "^5.9.0"
}
}
Questions? Issues?
references/common-issues.md for known errorsreferences/workflow-patterns.md for production patternstemplates/ directoryMaintainer: Jeremy Dawes | jeremy@jezweb.net
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer