Expression functions
Functions you can call inside {{ ... }}, in any string-typed activity input.
Where an expression goes
A bare name passes the variable itself. Braces are for everything else — property access, arithmetic, a function call, a pipe:
WriteLine(response) # the variable
WriteLine("{{ response.body }}") # a property
WriteLine("{{ len(orders) }} orders") # a call, inside a sentence
WriteLine("{{ orders | filter(.total > 1000) }}")
If you are reaching for Execute Python Code to filter a list, total a column or reshape some text, one of these is almost certainly shorter — and it runs in the workflow rather than in a Python process the robot has to start.
Which language evaluates it
A workflow declares one, in its expressionLanguage option: expr (the
default, and what a workflow that omits the key gets), js, or python.
The five packages below are spelled identically in all three, so
strings.ToUpper(name) is the same call whichever you picked.
The builtins are not. filter, map, sum, len and the rest of the
Built-in groups on this page are expr-lang's own. In JavaScript you write
items.filter(i => i.active); in Python, a comprehension. Everything on those
pages assumes expr.
The five packages
| Package | Functions | What it is |
|---|---|---|
strings.* | 38 | Go's strings package, named as Go names it |
math.* | 30 | Go's math package |
fuzzy.* | 7 | Approximate string matching — no native equivalent in any of the three languages |
collections.* | 3 | Glob matching and first-seen deduplication |
path.* | 6 | File paths, using the robot's own separator |
Two overlaps worth knowing before they bite:
min/maxare notmath.Min/math.Max. The builtins take one array,min([3, 1, 2]). Themathpair takes two numbers,math.Min(3, 1).get(m, "k")is notm.k.getreturns nothing for a key that is not there;m.kfails the step. Usegetfor anything optional.
Patterns
Every expression here was evaluated against the engine, against three orders — two open, one failed; two suppliers; totals of 1250, 300 and 8400.
| You want | Expression | Result |
|---|---|---|
| The rows that matter | filter(orders, .total > 1000) | the two over 1000 |
| One field from every row | map(orders, .reference) | ["ACME-0042", "ACME-0043", "GLOB-0011"] |
| Both, read left to right | orders | filter(.total > 1000) | map(.reference) | ["ACME-0042", "GLOB-0011"] |
| The distinct values | collections.Unique(map(orders, .supplier)) | ["ACME", "Globex"] |
| One row per supplier | collections.DistinctBy(orders, "supplier") | the first row of each |
| A total | sum(map(orders, .total)) | 9950 |
| A total of some of them | filter(orders, .status == "open") | map(.total) | sum() | 9650 |
| An average | mean(map(orders, .total)) | 3316.6666666666665 |
| How many went wrong | count(orders, .status == "failed") | 1 |
| One record | find(orders, .reference == "ACME-0042") | that row, or nothing |
| Its position | findIndex(orders, .status == "failed") | 1 |
| Buckets | groupBy(orders, .status) | a map of status to rows |
| In order | sortBy(orders, .total) | smallest total first |
| The biggest few | take(sortBy(orders, .total), 2) | the first two of those |
| A sentence from a list | strings.Join(map(orders, .reference), ", ") | "ACME-0042, ACME-0043, GLOB-0011" |
| Anything at all? | len(orders) > 0 | true |
| Did any fail? | any(orders, .status == "failed") | true |
| A value that may be absent | get(payload, "reference") | the value, or nothing |
| Does this filename match? | collections.Fnmatch(fileName, "INV-*.pdf") | true |
| A path that works on any robot | path.Combine(path.GetTempPath(), "export.csv") | the temp dir plus the name |
| The name without the extension | path.GetFileNameWithoutExtension(fileName) | "INV-2026-07" |
| The closest known supplier | fuzzy.BestMatch(supplierName, knownSuppliers) | "ACME Trading Limited" |
| How close it was | fuzzy.Similarity(supplierName, "ACME Trading Limited") | 0.8 |
Inside a predicate, .field is the current element's field and # is the
element itself — filter(codes, # startsWith "A") where the elements are plain
strings rather than rows.
Two results that surprise people
keys and values are unordered. keys({"id": 7, "status": "open", "total": 3})
came back ["id", "total", "status"]. Read a map by key; do not read it by
position.
path.* returns the robot's separator. path.Combine("reports", "2026") is
reports\2026 on a Windows robot and reports/2026 on Linux. That is the point
of the package — but it means a path built here and compared as a string against
one written with forward slashes will not match.
Groups
| Group | Functions | What it covers |
|---|---|---|
| Advanced | 5 | Compare, cut, UTF-8 validation |
| Aggregation | 5 | Total, average, median, smallest and largest |
| Array Operations | 20 | Length, filtering, mapping, searching, grouping and ordering |
| Basic Operations | 4 | Absolute value, min/max, modulo |
| Case Conversion | 3 | Upper, lower, title case transforms |
| Collection Helpers | 3 | Glob matching and first-seen deduplication |
| Constants | 2 | Mathematical constants (Pi, E) |
| Exponential & Logarithmic | 4 | Natural/base-10/base-2 logarithms, exponential |
| File Paths | 6 | Split and join file paths using the robot's own separator |
| Fuzzy Matching | 7 | Similarity scoring, approximate matching, fuzzy search and lookup |
| Hyperbolic | 3 | Hyperbolic sine, cosine, tangent |
| Indexing & Counting | 8 | Find positions, count occurrences |
| Map Operations | 3 | Keys, values, and member access that tolerates a missing key |
| Other | 3 | Timestamps, dates and durations |
| Power & Roots | 4 | Exponentiation, square/cube roots, hypotenuse |
| Replacement & Manipulation | 4 | Replace, repeat, clone strings |
| Rounding | 4 | Ceil, floor, round, truncate |
| Search & Check | 6 | Contains, prefix/suffix, case-insensitive equality |
| Splitting & Joining | 6 | Split strings, join arrays, whitespace fields |
| Trigonometric | 7 | Sine, cosine, tangent and inverses (radians) |
| Trimming | 6 | Remove whitespace, prefixes, suffixes, character sets |
| Type Conversions | 6 | Convert between int, float, string and JSON |
| Validation | 2 | NaN and infinity checks |