Conditions & Loops
Add conditional logic, branching, and iteration to your flows.
If / Otherwise
Every action step can have a condition attached to it. When a condition is set, the step only runs if the condition evaluates to true. If the condition is false, the step is skipped entirely.
Setting Up a Condition
- Open any action step in the flow editor
- Click Add Condition
- Select a property or variable (e.g.,
{{trigger.Priority}}) - Choose an operator: equals, not equals, contains, is empty, is not empty, greater than, less than
- Enter a value to compare against (e.g., “Urgent”)
The step now runs only when the condition is met. For example, a Send Notification step with the condition {{trigger.Priority}} equals Urgent will only fire for urgent items.
If / Otherwise Blocks
The If / Otherwise action type creates a branch in your flow. Steps nested under If run when the condition is true. Steps nested under Otherwise run when it is false. You can nest multiple steps inside each branch.
Example: If {{trigger.Status}} equals “Done”, archive the page and post a comment. Otherwise, send a reminder notification.
Switch / Case
For situations where you need more than two branches, use Switch / Case. It evaluates an expression and matches it against multiple cases.
Setting Up a Switch
- Add a Switch / Case step
- Set the Expression — any template variable like
{{trigger.Status}} - Add Cases — each case has a value to match and an optional label
- Use
*as the value for a default/catch-all case
The result tells you which case matched (by index). Use this with step conditions on subsequent steps to branch your flow into multiple paths.
Example
Expression: {{trigger.Priority}}
| Case | Value | Label |
|---|---|---|
| 0 | Urgent | High priority |
| 1 | Normal | Standard |
| 2 | * | Default |
Steps after the switch can check {{switchResult.matchedCase}} to decide what to do.
For Each Loops
The For Each action iterates over a list of pages returned by a previous query step.
Setting Up a Loop
- Add a Query Database step earlier in your flow and save its result (e.g., save as
tasks) - Add a For Each step below it
- Set the Source to the saved query result (
tasks) - Set Max Iterations (default is 50)
- Add steps inside the loop — they run once for each page in the result
Inside the loop, reference the current item with {{tasks.current}} and its properties with {{tasks.current.Name}}, {{tasks.current.Status}}, etc.
Example
Query all tasks in a database where Status is “Not Started”. Save as staleTasks. Add a For Each loop over staleTasks. Inside the loop, update each task’s Status to “Needs Attention” and add a comment saying “This task has not been started yet.”
Utility Steps for Flow Control
Set Variable
Store a computed or combined value for use in later steps. Unlike “Save result as” (which captures a step’s output), Set Variable lets you define arbitrary values.
Example: Set fullName to “{{trigger.First Name}} {{trigger.Last Name}}” — then use {{fullName}} in any later step.
Log Message
Write a message to the execution log. Choose a severity level (debug, info, warning, error). Template variables are resolved in the message. Useful for debugging or recording key data points during execution.
Abort Flow
Stop the entire flow immediately. All subsequent steps are skipped. The flow is recorded as failed with the abort message. Combine with conditions to implement guard clauses.
Example: If a required property is empty, abort with “Missing required field: {{trigger.PropertyName}}” — this prevents the rest of the flow from running with bad data.
Combining Conditions and Loops
You can attach conditions to steps inside a loop. This lets you selectively act on items that match additional criteria.
Example
- Query Database: Find all tasks. Save as
allTasks. - For Each: Loop over
allTasks. - Update Page (with condition
{{allTasks.current.Priority}} equals Urgent): Set Status to “In Progress”. - Send Notification (with condition
{{allTasks.current.Due Date}} is not empty): Notify the assignee.
Steps 3 and 4 each run only when their condition is met, so not every item gets every action.
Safety Limits
Notumation enforces limits to prevent runaway automations:
- Max 50 iterations per loop — if a query returns more than 50 results, only the first 50 are processed. Increase this limit on paid plans (up to 200).
- Max 200 total step executions per run — across all loops and branches in a single flow execution. If this limit is reached, the flow stops and logs an error.
These limits protect your workspace from accidental infinite loops or overly broad queries.