Learn Workflow Logic with Merge, IF & Switch Operations
## How it works Ever wonder how to make your workflows smarter? How to handle different types of data in different ways? This template is a hands-on tutorial that teaches you the three most fundamental nodes for controlling the flow of your automations: **Merge**, **IF**, and **Switch**. To make it easy to understand, we use a simple **package sorting center** analogy: * **Data Items** are packages on a conveyor belt. * The **Merge Node** is where multiple conveyor belts combine into one. * The **IF Node** is a simple sorting gate with two paths (e.g., Fragile or Not Fragile). * The **Switch Node** is an advanced sorting machine that routes packages to many different destinations. This workflow takes you on a step-by-step journey through the sorting center: 1. **Creating Packages:** Three different packages (two letters and one parcel) are created using Set nodes. 2. **Merging:** The first **Merge** node combines all three packages onto a single conveyor belt so they can be processed together. 3. **Simple Sorting:** An **IF** node checks if a package is fragile. If `true`, it's sent down one path; if `false`, it's sent down another. 4. **Re-Grouping:** After being processed separately, another **Merge** node brings the packages back together. This **Split > Process > Merge** pattern is a critical concept in n8n! 5. **Advanced Sorting:** A **Switch** node inspects each package's `destination` and routes it to the correct output (London, New York, Tokyo, or a Default bin). By the end, you'll see how all packages have been correctly sorted, and you'll have a solid understanding of how to build intelligent, branching logic in your own workflows. ## Set up steps **Setup time: 0 minutes!** This template is a self-contained tutorial and requires **zero setup**. 1. There are no credentials or external services to configure. 2. Simply click the **Execute Workflow** button. 3. Follow the flow from left to right, clicking on each node to see its output and reading the detailed sticky notes to understand what's happening at each stage.
- Platform
- n8n
- Category
- Education
- Price
- $14.99
- Creator
- Lucas Peyrin
- if
- set
- noOp
- merge
- switch
- stickyNote
- manualTrigger
How to import this workflow into n8n
- 1Purchase or download the workflow to get the n8n workflow JSON file.
- 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
- 3Open each node marked with a credential warning and connect your own accounts and API keys.
- 4Run the workflow once manually to verify the data flow, then toggle it to Active.
Related Education workflows
- Learn JSON Basics with an Interactive Step-by-Step Tutorial for Beginners$14.99
- Learn n8n Expressions with an Interactive Step-by-Step Tutorial for Beginners$14.99
- Automated AI Degree Audit Using Google Sheets and OpenAI$9.99
- Learn API Fundamentals with an Interactive Hands-On Tutorial Workflow$24.99
- Master Webhook Integration and Security with Supabase in n8n$14.99
- Master JavaScript Code Node with Interactive n8n Tutorial$9.99
More from Lucas Peyrin
Need this deployed? We'll set it up for you.
Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.