Flow Control Nodes
These nodes control where data goes and what shape it takes. Under the hood, everything is just JSON in n8n's array-of-items format. This chapter covers routing and shaping, with JSON structure explained next.
Efficient workflows don't just run, they route, fan out, merge, and reshape data with intention. Use these core building blocks to keep logic clean, isolate concerns, and give downstream steps exactly the structure they expect.
- IF — two-way branch (true/false);
- Switch — multi-way router by value;
- Aggregate — many items → one item with a list;
- Merge — multiple branches → one stream;
- Split Out — one list → many items.
Understanding these nodes is key to building efficient and maintainable workflows. Each one controls how data moves, transforms, and reunites inside n8n. Using them correctly ensures your automation is fast, reliable, and easy to debug.
- Clean routing keeps logic readable and debuggable;
- Correct packing/unpacking (
Aggregate/Split Out) is the difference between an AI step that gets it and one that hallucinates; - Merge lets separate concerns evolve independently, then reunite cleanly;
- Everything stays cheaper and faster when the right shape hits the right node.
With this you should be able to route data logically with IF and Switch, combine or separate items using Aggregate and Split Out, merge branches correctly, and understand how the JSON shape (item vs list) affects workflow behavior.
Kiitos palautteestasi!
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Can you explain more about how JSON format is used in these nodes?
What are some common mistakes to avoid when using these nodes?
Can you give an example of when to use Aggregate vs Split Out?
Awesome!
Completion rate improved to 4.17
Flow Control Nodes
Pyyhkäise näyttääksesi valikon
These nodes control where data goes and what shape it takes. Under the hood, everything is just JSON in n8n's array-of-items format. This chapter covers routing and shaping, with JSON structure explained next.
Efficient workflows don't just run, they route, fan out, merge, and reshape data with intention. Use these core building blocks to keep logic clean, isolate concerns, and give downstream steps exactly the structure they expect.
- IF — two-way branch (true/false);
- Switch — multi-way router by value;
- Aggregate — many items → one item with a list;
- Merge — multiple branches → one stream;
- Split Out — one list → many items.
Understanding these nodes is key to building efficient and maintainable workflows. Each one controls how data moves, transforms, and reunites inside n8n. Using them correctly ensures your automation is fast, reliable, and easy to debug.
- Clean routing keeps logic readable and debuggable;
- Correct packing/unpacking (
Aggregate/Split Out) is the difference between an AI step that gets it and one that hallucinates; - Merge lets separate concerns evolve independently, then reunite cleanly;
- Everything stays cheaper and faster when the right shape hits the right node.
With this you should be able to route data logically with IF and Switch, combine or separate items using Aggregate and Split Out, merge branches correctly, and understand how the JSON shape (item vs list) affects workflow behavior.
Kiitos palautteestasi!