Use this advanced n8n workflow pattern to manage long-running asynchronous processes. Implement checkpoints using the Wait n8n node and persistent state management using static data.
Download this n8n workflow template and start using it instantly.
Markdown-formatted text:
Advanced n8n Developers: Users who need to manage complex, multi-day, or human-in-the-loop automations.
System Architects: Professionals designing robust process flows that rely on external feedback or time delays.
Managing long-running processes in automation platforms like n8n can be challenging, especially when a workflow needs to pause (e.g., waiting for human approval or an external API callback) and then resume later with new data. The provided n8n workflow, known as the 'Teleport Pattern,' solves this by creating a dedicated state management system.
This system leverages the Wait n8n node to create 'Checkpoints' where the main process is physically paused and persisted. A separate 'Async Portal' workflow manages the session state using n8n's persistent static data feature. When a new event arrives for an existing session, the Portal instantly 'teleports' the data to the correct, paused execution via its unique resume URL, allowing the original n8n workflow to continue exactly where it left off. This ensures session continuity and reliable asynchronous processing.
Markdown-formatted text:
Manual Trigger or an initial n8n trigger (like a Webhook).sessionid and the resumeurl of the first upcoming Wait n8n node.Code n8n node (B. Check if Session is New or Existing) checks the workflow's static data for the sessionid.sessionid and the resumeurl and returns the initial data. The Main Process receives this, runs its initial logic, and then pauses at its first Checkpoint (4. PAUSE at Checkpoint 1).sessionid, the Portal detects this, retrieves the stored resume_url, and uses an HTTP Request n8n node (D. TELEPORT) to POST the new input data directly to that URL.Wait n8n node in the original Main Process execution, which resumes and processes the 'teleported' data. The workflow continues to the next checkpoint or completion.Markdown-formatted text:
Execute Workflow n8n node (2. Call Async Portal) to call itself (acting as the Portal), ensure the workflow ID configured in that node points to the current workflow ID once imported.Markdown-formatted text:
A. Entry: Receive Session Info (Execute Workflow Trigger): Acts as the entry point for the Async Portal. It receives critical parameters like sessionid, resumeurl, workflowid, and inputitems from the caller.
B. Check if Session is New or Existing (Code n8n node): The core persistence engine. It uses $getWorkflowStaticData('global') to read and write the state of active sessions, ensuring that session data persists across multiple n8n trigger executions.
C. Route Based on Session State (IF n8n node): Determines the flow: if new: false (existing session), it proceeds to teleport; otherwise, it passes through to start the main logic.
D. TELEPORT: Resume Paused Workflow (HTTP Request n8n node): This crucial step uses the dynamically obtained resume_url to make a POST request, effectively forcing the paused Wait n8n node in the other execution to resume.
4. PAUSE at Checkpoint 1 & 6. PAUSE at Checkpoint 2 (Wait n8n node): These nodes pause the execution and generate the unique, temporary webhook URL required for resumption. Checkpoint 1 is configured to send data back upon resumption, demonstrating two-way communication.
9368010f-f32c-43fc-bac1-e90d193ffca4 (Execute Workflow n8n node): This is the bridge. It calls the 'Async Portal' workflow and is set to 'Wait for Sub-Workflow' to receive the state check result before deciding to continue or pause.
Deploy a powerful Spotify automation toolkit for n8n AI agents. This n8n workflow exposes 30 core operations for music playback, playlists, artists, and albums, using the MCP n8n trigger.

Use this powerful n8n workflow to expose 16 different Splunk operations—including managing users, search jobs, and alerts—as tools for an AI agent via an n8n trigger. Optimize DevOps automation using this specialized n8n node setup.

A comprehensive Sentry.io automation tool server exposing 25 API operations via a single n8n workflow. Use this n8n template to integrate DevSecOps management seamlessly with AI agents.

Build an advanced AI tool server using an n8n workflow to manage Storyblok content. This n8n template exposes crucial content management operations for external AI agents.

Innovative builder with a passion for crafting automation solutions that solve real-world challenges. From streamlining workflows to driving efficiency, my work empowers teams and individuals to achieve more with less effort. Experienced in developing scalable tools and strategies that deliver results with n8n, supabase and cline.







































