A Content-Pipeline Port from n8n to Cloudflare Workflows
A 154-node n8n pipeline mapped into Cloudflare Workers and Workflows, with traceable step coverage, signed ingress, execution controls and test evidence.
THE BRIEF
What the system needed to do.
This project mapped a 154-node n8n content pipeline into native Cloudflare code. The source census separated 150 runtime nodes from four sticky notes, and 49 Code nodes were compiled into testable functions. The engineering challenge was to account for behavior, data and side effects while creating an execution path that could be inspected and operated.
The scope
- A census of 154 source nodes, including 150 runtime nodes.
- 49 Code nodes compiled into testable functions.
- Signed ingress, execution controls and explicit retry boundaries.
- Test evidence, a parity method and an operating runbook.
DESIGN CHOICES
What makes the build interesting.
Teams evaluating a move from visual orchestration to a controlled code-based execution path.
Keep a traceable mapping
Treat side effects deliberately
Rehearse the operational change
THE ARCHITECTURE
Follow the flow.
- Accept a defined request. An ingress Worker validates the signed request and the permitted inputs before a run is started.
- Apply execution controls. Idempotency, execution gates and status/stop interfaces make the request and its lifecycle explicit.
- Run the named steps. The workflow separates source retrieval, drafting, stored results, review and publishing into bounded stages.
- Inspect and recover. Tests, a parity method and an operating runbook connect the code to deployment and recovery decisions.
Tools and platforms
- Cloudflare Workers
- Workflows
- TypeScript
- n8n
- KV
What the design enables.
- Keep a traceable mapping. Every runtime node needs an explanation in the port; visual similarity is insufficient evidence of equivalent behavior.
- Treat side effects deliberately. Signed requests, idempotency and execution gates control what a replay or retry can do.
- Rehearse the operational change. The recorded canary and rollback exercise exposed an integration issue before wider use.
The difficult parts.
The port was treated as a behavioral mapping exercise. Counting nodes established the inventory; it did not, on its own, prove equivalent behavior. Inputs, outputs, branches and dependencies needed to be accounted for in the implementation and checks.
The control boundary mattered as much as the content-generation steps. A producer should be able to identify its request, inspect its progress and stop work deliberately. Repeated delivery of a request should not silently create another publishing action.
Build notes and context.
The port was treated as a behavioral mapping exercise. Counting nodes established the inventory; it did not, on its own, prove equivalent behavior. Inputs, outputs, branches and dependencies needed to be accounted for in the implementation and checks.
The control boundary mattered as much as the content-generation steps. A producer should be able to identify its request, inspect its progress and stop work deliberately. Repeated delivery of a request should not silently create another publishing action.
The implementation separates a retryable unit of work from an external side effect. That makes the point of failure easier to investigate and creates a clearer basis for deciding what can safely be attempted again.
The historical port had 33 tests before its first canary exercise. The first canary was rolled back in 21 seconds after an integration problem was identified. The later extracted public starter has its own test suite; its count should not be substituted for the historical port evidence.
The evidence presented here covers the implementation, tests and recorded canary exercise. It does not establish production parity for every external provider or workload. A production cutover needs checks against the actual providers, configuration and operating requirements of that deployment.
Related reading: The Cloudflare Field Manual. For a similar implementation, see Cloudflare development services.
Have a related process in mind?
Tell me what goes in, what should come out and where the current process gets stuck.