← Lesson
BitWithBite
n8n Automation · Quick Reference

Logic, Routing & Branching Cheat Sheet

n8n Automation
In one line: Real-world automation is never a straight line. This lesson teaches you to build workflows that make decisions: routing data down different paths, merging parallel branches, and...

Key Ideas

1IF Node — True or False Branching. The IF node is the most fundamental decision-maker in N8N. It evaluates a condition and sends each item down either the true output or the false output. Think of it as...
2Switch Node — Multi-Path Routing. When you have more than two possible routes, use the Switch node. It routes each item to one of up to 4+ output ports based on the value of a field, similar to a switc...
3Merge Node — Combining Branches. After branching with IF or Switch, you often need to bring data back together — for example, to send a single final email regardless of which path was taken. The Merge...

Code Examples

Condition: {{ $json.order_status }} equals "shipped" True path → Send "Your order is on its way!" email False path → Send "Your order is still being processed." email
Field: {{ $json.priority }} Output 0 → equals "critical" → PagerDuty alert Output 1 → equals "high" → Slack message Output 2 → equals "low" → Spreadsheet log Fallback → (anything else) → Email digest