Run a generic state machine runtime with Data Tables and sub-workflows
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.
What this workflow does
This workflow has 19 nodes and runs when another workflow calls it. It uses only n8n's built-in nodes.
How it runs
Trigger: When another workflow calls it.
- Prepare Event (Code): runs custom JavaScript code
- Read Machine Definitions (Data table): get
- Load Machine Definitions (Code): runs custom JavaScript code
- Find Event (Data table): get
- Plan Transition (Code): runs custom JavaScript code
- Append Event? (If): checks a condition and branches into true / false
- Append Event (Data table): uses Data table
- Existing Result (Code): runs custom JavaScript code
- After Append (Code): runs custom JavaScript code
- Has Task? (If): checks a condition and branches into true / false
…plus 8 more steps. See the full node list below.
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Check at runtime on n8n 3.0
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (5)
- Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Code
n8n-nodes-base.code - Data table
n8n-nodes-base.dataTable - If
n8n-nodes-base.if - Execute Sub-workflow
n8n-nodes-base.executeWorkflow
From the author
Quick overview This workflow acts as a generic state-machine runtime in n8n, replaying a case from an event stream stored in Data Tables, validating and appending new events, and optionally dispatching an entered-state task by starting a bound n8n…