If Statement Task¶
Overview¶
The If Statement Task adds decision-making logic to workflows. It compares values — usually outputs of earlier tasks — and sends the workflow down its true or its false branch.
When to use this task:
- Check that a field has a value before proceeding
- Route a workflow on a client's status, a form answer or an amount
- Handle different scenarios (new vs existing clients)
- Skip tasks when conditions aren't met
Key Features:
- Fourteen comparisons: text, number, date/time, yes/no, empty and null checks
- AND conditions inside a group, OR between groups
- A true branch and a false branch

The task has two output ports, and each child task is wired to one of them. A task connected to the wrong port simply never runs:
flowchart LR
A[Incoming data] --> B{Condition}
B -->|true| C[Tasks on the true port]
B -->|false| D[Tasks on the false port]
Quick Start¶
Builder fields¶
The Field column is the label as it appears in the task builder; Key is the name the value is stored under and referenced by.
| Field | Key | Type | Default | Notes |
|---|---|---|---|---|
| Conditions | _conditions |
condition-builder | – |
- Add the If Task to the workflow
- In the first box, enter the value to test:
{{task_12345_status}} - Choose the comparison (e.g. "Exactly matches")
- In the last box, enter what to compare it with:
Customer - Wire the tasks that should run when it holds to the true port, and the others to the false port
Simple Example:
Condition: {{task_15001_client_matched}} Boolean equals true
true port: Edit Client
false port: New Client
Comparisons¶
Each condition is value · comparison · value. Both values take {{variables}}, and
{{current_date}} (dd/mm/yyyy), {{current_day}} (e.g. Monday) and {{current_time}} (HHss).
| Comparison | Holds when |
|---|---|
| Text contains | the first value contains the second (case matters) |
| Text does NOT contain | the first value does not contain the second |
| Exactly matches | the two are the same text, character for character |
| Does not exactly match | the two differ |
| Number greater than / Number smaller than | both are numbers and the first is larger / smaller |
| Number exactly matches | both are numbers and equal (1.0 matches 1) |
| Date/time greater than / Date/time smaller than | the first is later / earlier — see below |
| Boolean equals | both are the same yes/no — true, yes, on, 1 and false, no, off, 0, empty, in any case |
| Is empty / Is not empty | the first value is / is not empty |
| Is null / Is not null | the first value has no value at all — its {{variable}} did not resolve — or has one |
Numbers. Text that is not a number, and empty text, never compares as a number — an empty
value is not "smaller than 5", and does not match 0. Clean values such as R1,234.56 with the
Formatter first.
Dates and times. A time of day (09:30, 09:30:15) compares with a time of day; a date
(dd/mm/yyyy, optionally with a time, or ISO 2026-10-01) with a date; weekday names compare in
week order (Sunday first). A value that cannot be read as either makes the condition false.
Empty vs no value. A {{variable}} that resolved to empty text is a value — it "is empty" and
"is not null". A {{variable}} that did not resolve at all — the task it names did not run, or has
no such output — has no value: it "is null", and "is empty" too.
Multiple Conditions¶
Conditions are arranged in groups:
- AND Condition adds a condition to a group — every condition in the group must hold.
- Add OR Group adds another group — the If is true when any one group holds.
Group 1: {{task_15001_status}} Exactly matches Lead
AND {{task_15001_custom_field_3272_value}} Number greater than 80
OR
Group 2: {{task_15001_status}} Exactly matches Customer
Meaning: hot leads, or any customer.
True/False Path Routing¶
Children are routed by the port they are wired to: tasks on the true port run when the conditions hold, tasks on the false port when they don't. A branch with nothing wired to it simply ends there — to stop a workflow when a check fails, wire nothing to that port.
Example Flow¶
1. Website Form
2. Match to Client
3. If Task: {{task_15_client_matched}} Boolean equals true
true port:
4a. Edit Client - update with the new data
5a. Email - "Thanks for getting in touch again"
false port:
4b. New Client - create the record
5b. Email - "Welcome"
When the task fails¶
The If fails — and neither branch runs — when it cannot answer the question it was given:
- No condition is configured.
- A condition has no comparison chosen.
- A comparison's second value is a
{{variable}}that did not resolve — the task it names did not run, or has no such output. Comparing with nothing would route the workflow on a guess.
These are configuration problems, so the task is not retried; the run's message names the condition.
Outputs¶
| Field | Type | Example | Notes |
|---|---|---|---|
result |
boolean | true |
The decision — the branch the workflow took. |
run_text |
string | Task TRUE.<br>"Lead" Text Exactly Matches "Lead" |
The last comparison evaluated and how it came out. |
You rarely read this task's output
Children are routed by which port they are wired to, so the usual pattern is to wire tasks to the
true and false ports rather than to test result downstream. Read result only when a later task
needs to know which way an earlier branch went.
Real-World Examples¶
Treat new and returning clients differently¶
Form Submission
└─ Match to Client contact_email from the form
└─ If Statement {{task_15_client_matched}} Boolean equals true
├─ true ─ Email "Welcome back"
└─ false ─ New Client create the record
Escalate only poor reviews¶
Google Review Received
└─ If Statement {{task_63001_star_rating}} Number smaller than 4
├─ true ─ Email alert a person
└─ false ─ Reply to Google Review post a thank-you
Skip contacts who opted out¶
Schedule
└─ Contact get the contact
└─ If Statement {{task_28001_contact_sms_unsubscribe}} Boolean equals false
└─ SMS send the message
Best Practices¶
- Be specific — "Exactly matches Active", not "Text contains Act"
- Check for a value first — "Is not empty" before comparing a value a form may leave out
- Use the right comparison — number comparisons for amounts, text for words
- Name it for the question — "Is this a VIP client?" rather than "If Task 1"
- Combine conditions — one If with AND/OR groups instead of a chain of Ifs
Troubleshooting¶
Condition Always False¶
- Extra spaces —
"Customer "does not exactly match"Customer" - Case — text comparisons are case-sensitive
- Numbers with symbols —
R1,234is not a number; clean it with the Formatter first - Empty values — an empty value is never greater or smaller than a number
Open the run in the workflow's Records: the If's message shows the values it compared.
Wrong Path Taken¶
- AND vs OR — conditions in one group must all hold; any one group is enough
- The opposite comparison — "Text contains" vs "Text does NOT contain"
- Wired to the wrong port — check which port each child hangs from
The If Failed¶
Read the run's message: it names the condition with no comparison chosen, or the {{variable}}
that did not resolve. Check that the task it names ran before the If, on the same branch.
Frequently Asked Questions¶
Can I nest If tasks?¶
Yes — wire an If to another If's true or false port. Keep it to a level or two; AND/OR groups usually say the same thing in one task.
How do I check several possible values?¶
Use OR groups — one group per value:
Can I compare two dynamic values?¶
Yes — both values take {{variables}}:
What if I need more than true/false paths?¶
Chain If tasks: the false port of the first leads to a second If, and so on.
Can I use wildcards or patterns?¶
Not in an If. Use the Regex task first and test its output.
Related Tasks¶
- Loop - Iterate over a list
- Variable - Store values to compare later
- Code - Complex custom logic
- Match to Client - Find the client to test
- Regex - Match patterns before an If