A workflow that does the same thing every time is limited. Logic nodes let it decide and combine information.
IF node
The IF node checks a condition and sends items down a true or false path. Example: if the order amount is high, notify a manager; otherwise, just log it.
Switch node
Switch sends items to one of several outputs, based on rules. Use it to route messages by category, such as sales, support or billing.
Filter node
Filter keeps only items that match a condition and drops the rest. Use it when you do not need a false path.
Merge node
Merge combines data from two branches. You can append items, match them by a shared field (like an email), or combine them by position. Use it to attach customer details to an order.
A practical example
A new enquiry arrives. IF checks whether the email is valid. A Switch routes by city to the right salesperson. Merge adds details from a sheet. The result is a clean, routed lead.
Tips
- Handle the empty case: decide what happens when no item matches.
- Name nodes clearly, so branches are easy to read.
- Test each branch with data that matches and data that does not.
Related
See loops for processing many items and expressions for writing conditions.
Quick answers
IF or Switch, which should I use?
Use IF for two paths and Switch for several.
What does the Merge node do?
It combines data from two branches, by position or by a matching field.
What happens when no item matches?
That branch gets no items, so plan for the empty case.
Related reading
- How to Build Your First n8n Workflow: Form to Sheet to Email
- n8n Webhook Node: Test URL vs Production URL Explained
- How to Use the HTTP Request Node in n8n to Call Any API
Not sure where to start?
Tell us your goal, whether it is your own business, freelancing, studies or a job, and we will say honestly if our 15-day live n8n course is the right fit.
See the 15-day n8n training | Find your city | Book free counselling