Formula - concat
The concat Formula function returns all its arguments joined, in order, into one string.
Syntax
concat(content, ..., content)
Parameters
| Parameter | Required | Description |
|---|---|---|
content |
Yes, two or more | The parts to join: static text in single quotes, body, context, or the result of another function, such as jsonPath or substring. |
Returns
One string with the arguments joined in the order you list them, with no separator. To add a separator, pass it as static text: concat(body, '-', context('id')).
That holds when every argument has one value. When an argument returns several values, concat returns one string per value, each joined with the other arguments. On {"orderId":"ORD-10005","lines":[{"sku":"A"},{"sku":"B"}]}, concat(jsonPath('orderId', body), ' / ', jsonPath('lines[*].sku', body)) returns two values, ORD-10005 / A and ORD-10005 / B, and concat(jsonPath('lines[*].sku', body), '|') returns A| and B|.
Examples
Example 1: Join two static strings
Input
None; the formula uses only static text.
Formula
concat('formula','Plugin')
Result
formulaPlugin

Static text works without a message body; case is kept as written.
Example 2: Append static text to the message body
Input
Nod
Formula
concat(body,'inite')
Result
Nodinite

The body comes first because it's the first argument.
Example 3: Repeat the message body
Input
Hey
Formula
concat(body,body)
Result
HeyHey

The same source can be used more than once.
Example 4: Prepend static text to a context property
Input
| Key | Value |
|---|---|
id |
ination |
Formula
concat('Imag',context('id'))
Result
Imagination

Static text and the value of the context property id are joined.
Example 5: Join the result of jsonPath and static text
Input
| Key | Value |
|---|---|
id |
{ "Id": 2 } |
Formula
concat(jsonPath('Id',context('id')),'A')
Result
2A

jsonPath reads Id from the JSON in the context property, and concat appends A.
Example 6: Join two nested functions
Input
Message body:
gmt
Message context:
| Key | Value |
|---|---|
id |
utc |
Formula
concat(toUpperCase(regex('gmt|utc', body)), toUpperCase(substring(0,3, context('id'))))
Result
GMTUTC

The first argument uppercases the regex match in the body; the second uppercases the first three characters of the context value.

The context property id used by the second argument in Example 6.