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
Automate parallel tasks with n8n and Webhook

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

Learn how to Build this Workflow with AI:

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.

Automate parallel tasks with n8n and Webhook

Visit through Desktop to Interact with the Workflow.

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 Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.