Operators let you work with static or dynamic variables in more advanced ways. They allow you to combine or modify dynamic variables by applying operators or literals to them, making them especially useful for creating more complex workflows.
To apply operators to a dynamic variable or to a static variable, you must wrap the chosen function in the double curly brackets syntax: {{}}
, as seen in the following example.
This example demonstrates the use of the array[:]
slice function with a step dynamic variable. It extracts elements from the step output starting from index 2 (inclusive), to index 4 (exclusive). So, it retrieves the elements at indices 2 and 3.
You can also use Utility Actions to apply specific operator logic to dynamic variables throughout the workflow.
The following literals are supported:
"hello"
, 'hello'
)103
, 2.5
, .5
[1, 2, 3]
{foo: "bar"}
true
and false
nil
Integer literals may contain digit separators to allow digit grouping into more legible forms.
Example:
Public properties on structs can be accessed by using the .
syntax.
If you pass an array into an expression, use the []
syntax to access array keys.
Functions may be called using ()
syntax. The .
syntax can also be used to call methods on an struct.
Operators are symbols or keywords that perform actions on values, like adding, comparing, or combining them. Supported operators include:
+
(addition)-
(subtraction)*
(multiplication)/
(division)%
(modulus)**
(pow)Example:
==
(equal)!=
(not equal)<
(less than)>
(greater than)<=
(less than or equal to)>=
(greater than or equal to)not
or !
and
or &&
or
or ||
Example:
+
(concatenation)matches
(regex match)contains
(string contains)startsWith
(has prefix)endsWith
(has suffix)To test if a string does not match a regex, use the logical not
operator in combination with the matches
operator:
You must use parenthesis because the unary operator not
has precedence over the binary operator matches
.
Example:
Result will be set to Arthur Dent
.
in
(contain)not in
(does not contain)Example:
foo ? 'yes' : 'no'
Example:
len
(length of array, map or string)all
(will return true
if all element satisfies the predicate)none
(will return true
if all element does NOT satisfies the predicate)any
(will return true
if any element satisfies the predicate)one
(will return true
if exactly ONE element satisfies the predicate)filter
(filter array by the predicate)map
(map all items with the closure)count
(returns number of elements what satisfies the predicate)Examples:
Ensure all tweets are less than 280 chars.
Ensure there is exactly one winner.
{...}
(closure)Closures allowed only with builtin functions. To access current item use #
symbol.
If the item of array is struct, it’s possible to access fields of struct with omitted #
symbol (#.Value
becomes .Value
).
array[:]
(slice)Slices can work with arrays or strings.
Example:
Variable array
is [1,2,3,4,5]
.
Operators let you work with static or dynamic variables in more advanced ways. They allow you to combine or modify dynamic variables by applying operators or literals to them, making them especially useful for creating more complex workflows.
To apply operators to a dynamic variable or to a static variable, you must wrap the chosen function in the double curly brackets syntax: {{}}
, as seen in the following example.
This example demonstrates the use of the array[:]
slice function with a step dynamic variable. It extracts elements from the step output starting from index 2 (inclusive), to index 4 (exclusive). So, it retrieves the elements at indices 2 and 3.
You can also use Utility Actions to apply specific operator logic to dynamic variables throughout the workflow.
The following literals are supported:
"hello"
, 'hello'
)103
, 2.5
, .5
[1, 2, 3]
{foo: "bar"}
true
and false
nil
Integer literals may contain digit separators to allow digit grouping into more legible forms.
Example:
Public properties on structs can be accessed by using the .
syntax.
If you pass an array into an expression, use the []
syntax to access array keys.
Functions may be called using ()
syntax. The .
syntax can also be used to call methods on an struct.
Operators are symbols or keywords that perform actions on values, like adding, comparing, or combining them. Supported operators include:
+
(addition)-
(subtraction)*
(multiplication)/
(division)%
(modulus)**
(pow)Example:
==
(equal)!=
(not equal)<
(less than)>
(greater than)<=
(less than or equal to)>=
(greater than or equal to)not
or !
and
or &&
or
or ||
Example:
+
(concatenation)matches
(regex match)contains
(string contains)startsWith
(has prefix)endsWith
(has suffix)To test if a string does not match a regex, use the logical not
operator in combination with the matches
operator:
You must use parenthesis because the unary operator not
has precedence over the binary operator matches
.
Example:
Result will be set to Arthur Dent
.
in
(contain)not in
(does not contain)Example:
foo ? 'yes' : 'no'
Example:
len
(length of array, map or string)all
(will return true
if all element satisfies the predicate)none
(will return true
if all element does NOT satisfies the predicate)any
(will return true
if any element satisfies the predicate)one
(will return true
if exactly ONE element satisfies the predicate)filter
(filter array by the predicate)map
(map all items with the closure)count
(returns number of elements what satisfies the predicate)Examples:
Ensure all tweets are less than 280 chars.
Ensure there is exactly one winner.
{...}
(closure)Closures allowed only with builtin functions. To access current item use #
symbol.
If the item of array is struct, it’s possible to access fields of struct with omitted #
symbol (#.Value
becomes .Value
).
array[:]
(slice)Slices can work with arrays or strings.
Example:
Variable array
is [1,2,3,4,5]
.