🛠️ State Management System for Long-Running Workflows with Wait Nodes
Ready for 3.0What this workflow does
This workflow has 22 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). It uses only n8n's built-in nodes.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- 2. Call Async Portal (Execute Sub-workflow): calls another n8n workflow
- B. Check if Session is New or Existing (Code): runs custom JavaScript code
- Response From Checkpoint (If): checks a condition and branches into true / false
- C. Route Based on Session State (If): checks a condition and branches into true / false
- Split Out: splits a list into separate items
- 3. Process Initial Data (Before Checkpoint 1) (Edit Fields (Set)): sets or maps fields
- D. TELEPORT: Resume Paused Workflow (HTTP Request): calls an HTTP API (POST)
- F. Prepare Initial Data (Edit Fields (Set)): sets 1 field: input_items
- 4. PAUSE at Checkpoint (Wait): pauses until webhook
- Wait Node Sent Response Items ? (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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- HTTP Request
n8n-nodes-base.httpRequest - Filter
n8n-nodes-base.filter - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - Split Out
n8n-nodes-base.splitOut - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - Wait
n8n-nodes-base.wait - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
How it works This template is a powerful, reusable utility for managing stateful, long-running processes. It allows a main workflow to be paused indefinitely at "checkpoints" and then be resumed by external, asynchronous events. This pattern is essential for…