Skip to product information

Generic State Machine Runtime for n8n Data Tables & Sub-Workflows

Generic State Machine Runtime for n8n Data Tables & Sub-Workflows

 (200+Reviews)
Regular price £55.99
Regular price £55.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Generic State Machine Runtime for n8n Data Tables & Sub-Workflows

Generic State Machine Runtime for n8n Data Tables & Sub-Workflows

Regular price £55.99
Regular price £55.99 Sale price
SAVE Sold out

Run event-sourced state machines in n8n—automatically replay cases, validate transitions, and dispatch sub-workflows

This Generic State Machine Runtime for n8n Data Tables & Sub-Workflows is an n8n workflow that replays a case’s event stream from n8n Data Tables, verifies whether a requested transition is allowed, appends new events safely (including duplicate checks), and—when a target state is configured—starts a bound n8n sub-workflow asynchronously to execute state tasks.

What this workflow does

  • Receives an execution request from another workflow and validates the incoming event (or handles an inspect-only request) and its identifiers.
  • Loads state-machine definitions from an n8n Data Table catalog and validates the machine/version details.
  • Reconstructs current state by reading the case’s existing events from an event-stream Data Table and replaying them.
  • Checks transition eligibility—either returns current status for inspect, or determines whether the requested transition is allowed.
  • Appends accepted events to the case event stream with the next sequence number and resolved correlation/causation details, unless the event is a duplicate.
  • Optionally dispatches a state task: if the entered target state declares a task, it looks up the machine/version/task binding and prepares a sub-workflow invocation payload.
  • Starts the bound sub-workflow asynchronously when a binding exists; otherwise returns the applied transition result with an “unavailable” dispatch reason.

Use cases

  • Workflow-driven business processes (e.g., order onboarding, case triage) that require strict transition rules and auditable event histories.
  • Event-sourced automations where you must replay state from stored events rather than rely on mutable status fields.
  • Decoupled state tasks by dispatching n8n sub-workflows when specific states are entered.

Technical details

  • Uses n8n nodes including if, code, Data Table, Execute Workflow, and Execute Workflow Trigger (plus a Sticky Note for documentation).
  • Requires three Data Tables: machine definitions, case event stream, and task bindings (configure and update Data Table IDs in the Data Table nodes).
View full details