Flow¶
Execute Workflow¶
Runs another workflow with the items and outputs what its last node returned. Call it per item or per batch to loop.
Inputs: main · Outputs: main
| Parameter | Type | Description |
|---|---|---|
Workflow (required)workflowId |
workflow | The workflow to run; it starts with an Execute Workflow Trigger and doesn't have to be active. |
Call itmode |
one of: onceForAllItems, eachItem, batches |
How often the other workflow runs. onceForAllItems: One call with all items.eachItem: One call per item: the other workflow is the body of a loop.batches: One call per batch of items, e.g. 100 at a time.Default: onceForAllItems. |
Batch sizebatchSize |
integer | Items per call, e.g. 100. Only when Call it is batches. Default: 10. |
Pause between calls (ms)delayMs |
integer | Waits this long before each call but the first, e.g. 1000 for the rate limit of an API; 0 = no pause. Only when Call it is eachItem or batches. Default: 0. |
Example: A loop: one call per customer
The other workflow (here: 'Send reminder') gets one item per call; the output is what its last node returned, all calls together.
Parameters:
{
"workflowId": "send-reminder",
"mode": "eachItem",
"delayMs": 1000
}
Input:
[
{
"customer": "Anna",
"open": 120
},
{
"customer": "Ben",
"open": 80
}
]
Output:
[
{
"customer": "Anna",
"open": 120,
"reminded": true
},
{
"customer": "Ben",
"open": 80,
"reminded": true
}
]
Filter¶
Keeps only the items that match a condition.
Inputs: main · Outputs: main
| Parameter | Type | Description |
|---|---|---|
Value 1value1 |
JSON | The value to check, usually a field such as {{ $json.total }}. Supports expressions. |
Operationoperation |
one of: isEqual, notEqual, contains, notContains, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, isEmpty, isNotEmpty, isTrue, isFalse |
How Value 1 is checked. isEqual: Same value; numbers as numbers, text with case.notEqual: Different value.contains: Text contains the text, or a list contains the value.notContains: Text or list doesn't contain it.greaterThan: Numbers by value, text alphabetically.greaterThanOrEqual: Numbers by value, text alphabetically.lessThan: Numbers by value, text alphabetically.lessThanOrEqual: Numbers by value, text alphabetically.isEmpty: Missing, null, empty text or an empty list.isNotEmpty: Has a value.isTrue: true, a number other than 0 or a text like true or yes.isFalse: Everything that isn't true.Default: isEqual. |
Value 2value2 |
JSON | The value to compare with, e.g. 100 or {{ $json.limit }}. Only when Operation is isEqual or notEqual or contains or notContains or greaterThan or greaterThanOrEqual or lessThan or lessThanOrEqual. Supports expressions. |
Example: Only orders above 100
Items that don't match are dropped.
Parameters:
{
"value1": "{{ $json.amount }}",
"operation": "greaterThan",
"value2": 100
}
Input:
[
{
"id": 1,
"amount": 120
},
{
"id": 2,
"amount": 80
},
{
"id": 3,
"amount": 450
}
]
Output:
[
{
"id": 1,
"amount": 120
},
{
"id": 3,
"amount": 450
}
]
Example: Only items with an email
Parameters:
{
"value1": "{{ $json.email }}",
"operation": "isNotEmpty"
}
Input:
[
{
"name": "Anna",
"email": "anna@example.com"
},
{
"name": "Ben",
"email": ""
}
]
Output:
[
{
"name": "Anna",
"email": "anna@example.com"
}
]
If¶
Routes each item to 'true' or 'false' depending on a condition.
Inputs: main · Outputs: true, false
| Parameter | Type | Description |
|---|---|---|
Value 1value1 |
JSON | The value to check, usually a field such as {{ $json.total }}. Supports expressions. |
Operationoperation |
one of: isEqual, notEqual, contains, notContains, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, isEmpty, isNotEmpty, isTrue, isFalse |
How Value 1 is checked. isEqual: Same value; numbers as numbers, text with case.notEqual: Different value.contains: Text contains the text, or a list contains the value.notContains: Text or list doesn't contain it.greaterThan: Numbers by value, text alphabetically.greaterThanOrEqual: Numbers by value, text alphabetically.lessThan: Numbers by value, text alphabetically.lessThanOrEqual: Numbers by value, text alphabetically.isEmpty: Missing, null, empty text or an empty list.isNotEmpty: Has a value.isTrue: true, a number other than 0 or a text like true or yes.isFalse: Everything that isn't true.Default: isEqual. |
Value 2value2 |
JSON | The value to compare with, e.g. 100 or {{ $json.limit }}. Only when Operation is isEqual or notEqual or contains or notContains or greaterThan or greaterThanOrEqual or lessThan or lessThanOrEqual. Supports expressions. |
Example: Large orders one way, the rest the other
Every item goes to exactly one output: true or false. Connect a node to each.
Parameters:
{
"value1": "{{ $json.amount }}",
"operation": "greaterThanOrEqual",
"value2": 100
}
Input:
[
{
"id": 1,
"amount": 120
},
{
"id": 2,
"amount": 80
}
]
Output true:
[
{
"id": 1,
"amount": 120
}
]
Output false:
[
{
"id": 2,
"amount": 80
}
]
Merge¶
Waits for both inputs and merges their items.
Inputs: input1, input2 · Outputs: main
| Parameter | Type | Description |
|---|---|---|
Modemode |
one of: append, combineByIndex |
How the items of the two inputs come together. append: The items of input 1, then the items of input 2.combineByIndex: Item 1 of both inputs becomes one item, item 2 the next, …; input 2 wins when both have a field.Default: append. |
Example: Append the items of both branches
E.g. after an If: both branches come together again.
Parameters:
{
"mode": "append"
}
Input input1:
[
{
"id": 1,
"route": "express"
}
]
Input input2:
[
{
"id": 2,
"route": "standard"
},
{
"id": 3,
"route": "standard"
}
]
Output:
[
{
"id": 1,
"route": "express"
},
{
"id": 2,
"route": "standard"
},
{
"id": 3,
"route": "standard"
}
]
Example: Combine items by position
Item 1 of input 1 and item 1 of input 2 become one item, and so on.
Parameters:
{
"mode": "combineByIndex"
}
Input input1:
[
{
"id": 1,
"customer": "Anna"
},
{
"id": 2,
"customer": "Ben"
}
]
Input input2:
[
{
"status": "paid"
},
{
"status": "open"
}
]
Output:
[
{
"id": 1,
"customer": "Anna",
"status": "paid"
},
{
"id": 2,
"customer": "Ben",
"status": "open"
}
]
Switch¶
Routes each item to the output of the first matching case.
Ports: depend on the parameters.
| Parameter | Type | Description |
|---|---|---|
Valuevalue |
JSON | The value that decides the output, usually a field such as {{ $json.country }}. Supports expressions. |
Casescases |
list of JSON | One output per case, e.g. AT, DE, CH; items matching no case go to fallback. |
Example: One output per country
The outputs are case-0, case-1, … in the order of the cases; everything else goes to fallback.
Parameters:
{
"value": "{{ $json.country }}",
"cases": [
"AT",
"DE"
]
}
Input:
[
{
"id": 1,
"country": "DE"
},
{
"id": 2,
"country": "AT"
},
{
"id": 3,
"country": "CH"
}
]
Output case-0:
[
{
"id": 2,
"country": "AT"
}
]
Output case-1:
[
{
"id": 1,
"country": "DE"
}
]
Output fallback:
[
{
"id": 3,
"country": "CH"
}
]
Wait¶
Pauses the execution, then passes the items on. Waits in memory; a restart of the host ends the execution.
Inputs: main · Outputs: main
| Parameter | Type | Description |
|---|---|---|
Wait foramount |
number | How long, e.g. 30; the items go on unchanged afterwards. Default: 5. |
Unitunit |
one of: seconds, minutes, hours |
Unit of the time. seconds: Seconds.minutes: Minutes.hours: Hours; long waits are better done with a Cron Trigger.Default: seconds. |
Example: Wait a second before the next call
The items go on unchanged after the pause, e.g. to give another system time to finish.
Parameters:
{
"amount": 1,
"unit": "seconds"
}
Input:
[
{
"id": 1
}
]
Output:
[
{
"id": 1
}
]