In modern business, processes are rarely linear. An order might be “Pending,” “Processing,” “Cancelled,” or “Refunded,” and each status requires a different response. Manually sorting these can take hours and lead to errors.
In this guide based on a tutorial by GenAI Unplugged, we’ll explore how to use Branching in n8n to automate complex decision-making without writing a single line of code.
The Scenario: Automating Order Management
Imagine a business where an operator manually reviews 100+ orders daily:
- Pending: Alert the service team via email to contact the customer [01:00].
- Processing: Send a Slack message to the operations team to expedite high-priority shipping [01:16].
- Cancelled/Refunded: Notify the finance team via both email and Slack for record-keeping [01:34].
Step 1: Fetching the Data
The workflow begins with a Schedule Trigger (to run daily) and a Google Sheets node to fetch all current orders [03:31]. Even with 100 items, n8n processes them as a structured list, allowing you to apply logic to every single row automatically [05:52].
Step 2: The Switch Node (Multi-Path Branching)
While an If Node is great for “Yes/No” questions, the Switch Node is the powerhouse for multi-path branching. It allows you to create different “routing rules” based on a specific value—in this case, the orderStatus [08:19].
- Rule 1: If status equals
Pending→ Output to “Pending Orders” branch. - Rule 2: If status equals
Processing→ Output to “Processing Orders” branch. - Rule 3: If status equals
Cancelled→ Output to “Cancelled Orders” branch. - Rule 4: If status equals
Refunded→ Output to “Refunded Orders” branch [12:44].
Pro Tip: Always use the “Ignore Case” option in the Switch node. This ensures that if someone types “pending” instead of “Pending,” your automation won’t break [15:11].
Step 3: Executing Different Actions
Once the data is split into branches, you can connect each one to a different service:
- Email (AWS SES): Connected to the “Pending” branch to alert the service team [15:32].
- Slack: Connected to the “Processing” branch to post in the #high-priority-orders channel [18:41].
Step 4: Parallel Branching (Multiple Actions for One Item)
A key concept in n8n is that one branch can trigger multiple nodes simultaneously. For the Cancelled and Refunded branches, we want two things to happen: an email to be sent and a Slack message to be posted. By dragging two connector lines out of a single branch, n8n ensures both actions are performed for every item in that list [20:45].
Summary: Two Types of Branching
n8n supports two fundamental ways to move data:
- Discriminative Branching: Splitting items so they follow different paths based on logic (e.g., Pending vs. Processing) [24:03].
- Parallel Branching: Allowing the same item to follow multiple paths to trigger several actions at once (e.g., Email + Slack) [24:40].
By mastering these branching techniques, you can turn a rigid manual process into a smart, flexible, and error-free automation.
Watch the full video tutorial here: How Branching works in n8n Workflows


