nodes / builtin / flow
IF
Route items to different branches based on conditions
Send each item down a True or a False branch, depending on conditions you set.
Try it
Section titled “Try it”Price On Page Watch: a workflow with 6 steps, starting with When the price changes and ending with Remember this price.
What it does
Section titled “What it does”IF checks its conditions for every item that arrives. When they hold, the item leaves through the True port; otherwise it leaves through False. The item itself is not changed.
Each condition compares a value (usually an expression such as {{ $input.price }}) with another value, using an operator that fits the type you pick: String, Number, Date-Time, Boolean, Array or Object (for example Contains, Is Equal To or Is Not Empty). With several conditions, link them with AND (all must hold) or OR (any one is enough).
When to use it
Section titled “When to use it”- Do something only for some items: “only send a message when the price dropped”.
- Take one of two paths: save new contacts, update existing ones.
- Stop a branch early: leave the False port unconnected and those items simply go no further.
For more than two paths, use Switch. To drop items without branching, use Filter.
Inputs and settings
Section titled “Inputs and settings”| Setting | Type | What it does |
|---|---|---|
| Conditions (required) | Conditions | The conditions to evaluate. |
Outputs
Section titled “Outputs”-
True -
False
Each output item has these fields:
| Field | Type | What it holds |
|---|---|---|
| result | True/false | Whether the conditions held |
| inData | Any | The incoming data, unchanged |
{ "result": true, "inData": null}Port True is the top one and False the bottom one. Connect either or both.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Example workflow
Section titled “Example workflow”- RSS Feed Read fetches new posts.
- IF checks that
{{ $input.title }}(String) Containsrelease. - True goes to a Slack node that posts the link. False is left unconnected.
Common issues
Section titled “Common issues”- “IF needs at least one condition.” Add a condition, or remove the node.
- Every item goes to False. Check the operator type. A number stored as text compares as text, so pick the type that matches the data (Number for prices), or convert it first with Edit Fields.
- The expression is empty. Open the input panel and pick the field instead of typing it, so the path matches the data that actually arrives.