Asynchronous Workflow Split and Resume Pattern - n8n Workflow

Master advanced n8n workflow design using the Wait n8n node and resumeUrl callback method. Manage long-running, asynchronous tasks across independent n8n executions seamlessly.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Advanced n8n users needing to manage asynchronous processes.

  • Developers building long-running integrations that require external, time-consuming services.

  • Anyone designing complex n8n templates where a primary execution must pause and wait for a secondary n8n trigger event.

Overview

This advanced n8n workflow demonstrates a crucial technique for handling processes that require a significant waiting period or involve an external, independent system firing a callback. When a typical n8n execution encounters a long delay, it risks timing out. This n8n workflow template solves this by initiating a 'Primary Execution' that pauses using the specialized Wait n8n node. It generates a unique resumeUrl which is then passed to a 'Secondary Execution' (which could be a separate n8n workflow or an external system). The Secondary Execution performs the necessary steps (like fetching data or waiting for an external reply) and uses the resumeUrl to fire a callback, resuming the original Primary Execution. This allows the Primary flow to access context data gathered both before the pause and during the Secondary process, making this a powerful n8n flow control mechanism.

How it Works

This n8n workflow operates in two main phases: the Primary Execution and the Secondary/Independent Process.

Primary Execution


  1. Initial n8n Trigger: The execution begins with the When clicking ‘Test workflow’ manual n8n trigger.

  2. Context Setting: The Set Primary Execution Context n8n node stores variables necessary for the rest of the flow.

  3. Initiate Secondary Flow: The HTTP Request - Initiate Independent Process n8n node calls the webhook for the Secondary Process, crucially passing the $execution.resumeUrl as a payload parameter.

  4. Pause: The Primary flow hits the Wait n8n node, pausing its execution indefinitely until its unique webhook callback URL (derived from the resume URL) is hit.

  5. Resumption: Once the Secondary Process executes the callback, the Primary execution resumes at the Wait n8n node.

  6. Data Merge: The This Node Can Access Primary and Secondary n8n node demonstrates how data stored before the wait and data passed back via the callback (from the Secondary Process) are combined.

Secondary/Independent Process


  1. Independent n8n Trigger: The Webhook n8n trigger starts this separate execution, receiving the resumeUrlForWaitingExecution and other context.

  2. External Simulation: This process simulates work, retrieving data (like a random joke from HTTP Request - Get A Random Joke) and waiting for a short period.

  3. Callback: The Simulate Event that Hits the 2nd Trigger/Flow n8n node (an HTTP Request) uses the received resumeUrl to fire a POST request back to the Primary Execution's Wait n8n node, passing the gathered data (like the joke) in the body. This action resumes the original n8n workflow execution.

Installation Guide

To use this complex n8n workflow template, follow these steps:


  1. Import: Copy the entire n8n workflow JSON and import it into your n8n instance.

  2. Separation: Note that this file contains two flows (Primary and Secondary). For production use, the nodes labeled 'Simulated External Independent Process' (starting with the Webhook node at position [280, 1260] and its successors) should ideally be cut and pasted into a separate n8n workflow instance.

  3. URL Adjustment: Since this pattern involves cross-workflow communication, you must ensure all HTTP Request n8n nodes that reference http://127.0.0.1:5678 are updated to your actual n8n instance URL if running remotely.

  4. Activation: Activate both the Primary and Secondary n8n workflows.

  5. Testing: Execute the Primary workflow via the manual n8n trigger to observe the split and resume action.

Node Details


  • When clicking ‘Test workflow’ (Manual Trigger n8n trigger): Initiates the Primary Execution of this n8n workflow.

  • Set Primary Execution Context (Set n8n node): Stores initial context items, including a placeholder ID for the simulated external workflow, which is used in the next step.

  • HTTP Request - Initiate Independent Process (HTTP Request n8n node): Sends a request to start the Secondary Process. The critical configuration is passing {{ $execution.resumeUrl }} to allow the secondary flow to call back and resume the Primary execution.

  • Wait (Wait n8n node): Pauses the Primary Execution indefinitely, converting the flow into a waiting webhook listener, expecting a POST callback to its unique resumeUrl.

  • Receive Input from External, Independent Process (Webhook n8n trigger): Serves as the independent n8n trigger for the Secondary Process, capturing the resumeUrlForWaitingExecution passed by the Primary flow.

  • HTTP Request - Resume Other Workflow Execution (HTTP Request n8n node): The final step of the Secondary Process. It constructs an HTTP POST request targeting the primary execution's resumeUrl, thus resuming the original paused n8n workflow. It also passes new data (e.g., joke details) back.

  • This Node Can Access Primary and Secondary (Set n8n node): Demonstrates data scope by accessing variables from the initial primary context (Set Primary Execution Context) and variables passed back by the resumed webhook (via the Wait n8n node).

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by
Hubschrauber
Hubschrauber

Software developer specializing in "back-end plumbing" to connect and sync data between large corporate systems, enabling application distribution/migration, scaling, and containerization. Using n8n for various orchestration tasks both at home and "on the job."

Featured*