Examples

A cookbook of worked workflows — feature building blocks today, full real-world recipes coming next.

A library of complete, runnable workflows to read and adapt. Each ships as a .js file in examples/workflows/ and with the Pro skill; register any of them with flowctl def create --file <file> and start it with flowctl run start.

Building blocks

Small workflows that each demonstrate one construct — the fastest way to see a feature in isolation:

ExampleShows
hello.jsThe minimal workflow: one step, an apiTrigger, next: "end".
simple-approval.jsA form with a JSON schema, branch() routing, a query.
multi-step.jsSequential steps and a signal pause/resume.
branch-router.jsA pure routing step (and why it still needs a handler).
form-loop.jsLooping back to a form on invalid input, with a max-attempt escape.
foreach-batch.jsIterating an array variable with foreach.
parallel-fanout.jsRunning steps concurrently and joining.
webhook-order.jsParking on a webhook and branching on the callback.
retry-http.jsA connector with retryPolicy + onError.
http-connector-test.jsThe generic-HTTP envelope (GET + POST).
llm-prompt.jsForm input → LLM connector → store.
scheduled-report.jsA scheduleTrigger with a collision policy.
composio-gmail.jsThe Composio flat-args envelope.
neon-mcp.jsAn MCP connector over remote HTTP (Neon).
filesystem-write.jsAn MCP connector over a spawned stdio server.
agent-triage.jsAn agent() step with a typed, schema-validated result.
invoice-approval.jsMulti-level form approval with a result reducer.
order-processing.jsThe kitchen sink: retries, loop, foreach, parallel, webhook, errors, templates.

Real-world recipes

End-to-end, domain-shaped workflows you can adapt to production scenarios. Each has a walkthrough (problem → diagram → annotated workflow → how to run → variations) and a runnable source file:

RecipeSketch
Nightly DB report → emailscheduleTrigger → query a database → LLM summarize → email the summary.
Incident escalationalert → agent() classify severity → branch → parallel notify → human ack.
Lead enrichment & routingnew-lead trigger → HTTP enrich → LLM score → branch route → email.
Customer refund approvalrequest → threshold branch → multi-level form approval → payment connector.
Let Claude Code scaffold one

With the flowwork skill installed, you can describe a workflow in plain language and have Claude Code scaffold it from the closest recipe — then run and drive it over channels.