Skip to main content

πŸŽ“ Optimize Speed-Critical Workflows Using Parallel Processing (Fan-Out/Fan-In)

Workflow preview

Workflow preview
100%
πŸŽ“ Optimize Speed-Critical Workflows Using Parallel Processing (Fan-Out/Fan-In) preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This template is a hands on tutorial for one of the most advanced and powerful patterns in n8n: asynchronous parallel processing , also known as the Fan Out/Fan In model. When should y...

Best for

  • Engineering automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.switch, n8n-nodes-base.splitout, n8n-nodes-base.set, n8n-nodes-base.wait, n8n-nodes-base.executeworkflow, n8n-nodes-base.executeworkflowtrigger, @n8n/n8n-nodes-langchain.lmchatgooglegemini

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lucas Peyrin.

Original n8n.io source

1.1 Workflow description

Title
πŸŽ“ Optimize Speed-Critical Workflows Using Parallel Processing (Fan-Out/Fan-In)
Workflow name
πŸŽ“ Optimize Speed-Critical Workflows Using Parallel Processing (Fan-Out/Fan-In)

How it works

This template is a hands-on tutorial for one of the most advanced and powerful patterns in n8n: asynchronous parallel processing, also known as the Fan-Out/Fan-In model.

When should you use this? Use this pattern when speed is your top priority and you have multiple independent, long-running tasks. Instead of running them one after another (which is slow), this workflow runs them all at the same time and waits for them all to finish.

We use a Construction Project analogy to explain the architecture:

  • The Main Workflow (Top): This is the Project Manager. It defines the project, assigns all the tasks to specialist teams, and then pauses, waiting for a final report.
  • The Sub-Workflow (Bottom): This represents the Specialist Teams. It's a single, reusable workflow that can perform any task it's assigned.
  • Static Data (The Brains): A hidden Project Dashboard is used to track the status of every task in real-time.

The process follows three key phases:

  1. Fan-Out: The Project Manager starts multiple sub-workflows at once without waiting for them to finish.
  2. Asynchronous Execution: Each Specialist Team works on its task independently and in parallel. When a team finishes, it updates its status on the Project Dashboard.
  3. Fan-In: The Project Manager, which has been paused by a Wait node, is only resumed when the Project Dashboard confirms that all tasks are complete. It then receives the aggregated results from all the parallel tasks.

Set up steps

Setup time: < 1 minute

This workflow is a self-contained tutorial. The only setup required is to configure the AI model.

  1. Configure Credentials:
    • Go to the The AI Specialist node in the sub-workflow (bottom flow).
    • Select your desired AI credential (Gemini in that case).
  2. Execute the Workflow:
    • Click the "Execute Workflow" button on the Start Project node.
  3. Explore and Learn:
    • Follow the execution path to see how the main workflow fans out, and how the sub-workflow is called multiple times.
    • Click on each node and read the detailed sticky notes to understand its specific role in this advanced pattern.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Start Project

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - The Dispatcher

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 3 - Split Out Tasks

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 4 - The Project Brief

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Wait for All Teams to Finish

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 6 - Assign Tasks to Teams

Type / Role
n8n-nodes-base.executeWorkflow - executeWorkflow
Config choices
Version 1.2

Block 7 - Receive Work Order

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 8 - The AI Specialist

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 9 - Description Team

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 10 - Ad Copy Team

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 11 - Email Team

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 12 - Report Back to Manager

Type / Role
n8n-nodes-base.executeWorkflow - executeWorkflow
Config choices
Version 1.2

Block 13 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - The Project Dashboard (Code)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Start Process

Type / Role
n8n-nodes-base.executeWorkflow - executeWorkflow
Config choices
Version 1.2

Block 17 - Check Work Order Status

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 18 - Is Project Complete?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 19 - Resume Parent Workflow

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 20 - Project Complete!

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 21 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 34 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow πŸŽ“ Optimize Speed-Critical Workflows Using Parallel Processing (Fan-Out/Fan-In)
Complexity advanced
Nodes 34
Categories Engineering, Multimodal AI
Author Lucas Peyrin
Published 22 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6247/6247.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does πŸŽ“ Optimize Speed-Critical Workflows Using Parallel Processing (Fan-Out/Fan-In) do?

How it works This template is a hands on tutorial for one of the most advanced and powerful patterns in n8n: asynchronous parallel processing , also known as the Fan Out/Fan In model. When should y...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, Multimodal AI use case.