Manage Parallel Sub-Workflows in n8n with Webhook Callback

Discover how to orchestrate multiple parallel sub-workflows in n8n using webhook callbacks for pseudo-synchronous waiting. This workflow helps automate concurrent tasks, track their completion, and ensures all subtasks finish before proceeding, saving hours in manual coordination.
manualTrigger
httpRequest
webhook
+7
Workflow Identifier: 1852
NODES in Use: ManualTrigger, Code, SplitInBatches, Set, HttpRequest, Wait, If, RespondToWebhook, Webhook, NoOp

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow starts many n8n sub-workflows at the same time and waits for all their results before moving on.
It solves slow manual running and tracking of parallel tasks.
The result is a single workflow that knows when all subtasks are done, so you save time and avoid errors.

It gets a list of tasks as input, starts them together, then waits for each to call back via webhook.
The workflow keeps a list of finished tasks to track progress and only continues when all are complete.

  • Starts many workflows at once: Sends HTTP POST requests to start each sub-workflow.
  • Tracks tasks done: Uses a variable array to store which tasks finished.
  • Waits for callbacks: Uses a webhook wait node to pause and resume when sub-workflows call back.
  • Avoids conflicts: Retry and delays in callbacks prevent clashes when multiple complete together.
  • Simulates input: Uses a code node to make fake task data for demo and testing.

How the Workflow Works (Input → Process → Output)

Input

The workflow starts with a manual trigger and a Code node that produces an array of task request IDs.
This simulates having many tasks to process in parallel.

Processing Steps

  • The SplitInBatches node takes each task item and processes them one by one.
  • A Set node initializes an empty array named finishedSet to store IDs of finished sub-workflows.
  • An HTTP Request node sends POST requests to start sub-workflows using the webhook URL with each requestId.
  • A Webhook Callback Wait node waits for each sub-workflow to call back indicating completion.
  • A Code node updates the finishedSet array with each new callback ID, avoiding duplicates.
  • An If node checks if all tasks finished by comparing finishedSet length to total tasks.
  • The workflow either waits for more callbacks or proceeds to the next step when all done.

Output

The workflow only proceeds when all child workflows have reported completion.
This ensures downstream steps get full, correct data.


Who Should Use This Workflow

This workflow fits users who need to handle many parallel tasks inside n8n.
It helps when managing multiple workflows that must complete before moving on.

It is good for operations teams, developers, or automation builders wanting to improve time or accuracy.
It works well when sub-workflows send webhook callbacks to report their status.


Tools and Services Used

  • n8n Manual Trigger node: Start the workflow manually.
  • n8n Code node: Simulates an input list of tasks.
  • n8n SplitInBatches node: Loops over each task to process.
  • n8n Set node: Creates variables to track finished tasks.
  • n8n HTTP Request node: Posts data to start sub-workflows.
  • n8n Webhook Callback Wait node: Waits for sub-workflows to call back when done.
  • n8n If node: Compares finished tasks to expected total.
  • n8n Respond to Webhook node: Confirms callbacks were received.
  • Environment variable WEBHOOK_URL: Base URL for webhook endpoints.

Beginner Step-by-Step: How to Use This Workflow in Production

Download and Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open your n8n editor and use “Import from File” to bring in the workflow.

Configure After Import

  1. Add any required credentials or API keys in n8n for HTTP Request nodes.
  2. Update the environment variable WEBHOOK_URL if needed to match your n8n instance’s URL.
  3. Check and update any IDs, emails, Slack channels, folders, or database tables if mentioned.
  4. Review the simulated input code in the Code node that creates request IDs and adjust if real input is available.

Testing and Activation

  1. Run the workflow once using the manual trigger to verify it starts sub-workflows and waits for callbacks.
  2. Make sure sub-workflows are active and their webhook endpoints are reachable.
  3. When testing succeeds, activate the workflow to run automatically based on your need.
  4. The workflow will now handle parallel task orchestration and completion tracking without manual checks.

For hosting n8n on your own server, see self-host n8n for setup tips.


Customizations

  • Add a logging step after updating finishedSet to store completed task IDs externally.
  • Change the number of parallel workflows by adjusting the batch size in the SplitInBatches node.
  • Send different tasks to different sub-workflows by changing the HTTP Request URL dynamically with expressions.
  • Add an Error Trigger node to alert a Slack channel or email if a sub-workflow fails.
  • Set a timeout in the webhook wait node to handle cases where callbacks do not arrive.

Troubleshooting

  • Webhook Callback Wait node not resuming: Check method is POST and response mode is Response Node.
  • finishedSet not updating: Ensure Code node checks for duplicates before pushing new IDs.
  • Race conditions on callbacks: Use retry and delay in HTTP Request that triggers sub-workflows to avoid multiple quick resume calls.

Frequently Asked Questions

The workflow tracks finished workflows by keeping an array of finished IDs updated when webhook callbacks arrive from each sub-workflow.
The Webhook Callback Wait node pauses the main workflow until a sub-workflow sends a completion callback via a POST request.
The workflow can include error triggers and notification nodes, but error handling must be added explicitly to alert on failures.
A beginner can download the workflow file, import it using Import from File in the n8n editor, configure webhook URLs and credentials, then test and activate it.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free