Templates / 🛠️ State Management System for Long-Running Workflows with Wait Nodes

🛠️ State Management System for Long-Running Workflows with Wait Nodes

Ready for 3.0

by Lucas Peyrin ✓ · 2,615 views · created 2025-07-22 · Engineering

Ready 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.

📬 Weekly n8n 3.0 breakage alerts, free

What 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).

  1. 2. Call Async Portal (Execute Sub-workflow): calls another n8n workflow
  2. B. Check if Session is New or Existing (Code): runs custom JavaScript code
  3. Response From Checkpoint (If): checks a condition and branches into true / false
  4. C. Route Based on Session State (If): checks a condition and branches into true / false
  5. Split Out: splits a list into separate items
  6. 3. Process Initial Data (Before Checkpoint 1) (Edit Fields (Set)): sets or maps fields
  7. D. TELEPORT: Resume Paused Workflow (HTTP Request): calls an HTTP API (POST)
  8. F. Prepare Initial Data (Edit Fields (Set)): sets 1 field: input_items
  9. 4. PAUSE at Checkpoint (Wait): pauses until webhook
  10. 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.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (12)

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…

Excerpt from Lucas Peyrin's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.