n8n Node Library

The If Node

Splits into two branches, true or false, based on a condition.

What it actually does

The IF node checks every item against a condition, then sends it down one of two paths: “true” if it matches, “false” if it doesn’t. It’s the node you reach for whenever your workflow needs to behave differently depending on the data — only email customers with an order over £50, only process files with a certain extension, that kind of thing.

You can compare strings, numbers, dates, or booleans, and n8n gives you the matching set of operators for whichever type you’ve picked — things like “equals,” “contains,” or “is after” for dates. If you need more than one condition, you can chain several together and combine them with AND (all conditions must match) or OR (any one will do).

Downstream, the node has two outputs — true and false — and you connect whatever should happen next to whichever branch makes sense. Items that don’t match the condition don’t vanish; they still come out, just on the other branch.

A worked example

The video’s example checks whether an order total is greater than £50: condition set to “Number → is greater than → 50,” run against a list of orders, and the node splits them cleanly into two branches — big orders down “true,” everything else down “false.”

A slightly more realistic example: checking a form submission’s country field before routing it. Condition set to “String → equals → United Kingdom,” with UK submissions going down the “true” branch to a node that applies UK-specific VAT rules, and everything else going down “false” to a generic handler.

The mistake almost everyone makes first

Comparing values as different data types — a text field against a number, say. This doesn’t fail silently: n8n throws an explicit “Wrong type” error and the run stops.

It usually happens when a field that looks numeric (an order ID, a price pulled from a form) actually arrives as a string. The fix is to check the data type of the field you’re comparing before trusting it, or — if it genuinely doesn’t matter which type you get — enable “Convert types where required” in the node’s options.

Related nodes

Switch — the multi-branch version, for routing into more than two paths · Merge — often follows, to recombine the branches afterward