Expression Syntax
All expressions begin with an "@" symbol and an open parenthesis, e.g. @(now() or @(time_from_parts(). Once you type @(, a completion menu opens that lists the matching functions and variables:

Functions, variables and other parts of an expression are highlighted in different colors, which makes them easier to tell apart and keeps your logic easy to follow.

Simple Syntax
This is used to embed single values, e.g.
Hi @contact, you entered @results.age for age. Is this correct?
An expression can also be a function call, e.g.
Hello @(upper(contact.first_name))
Function names are not case-sensitive, so UPPER is the same as upper. We support a subset of the functions available in Excel, and these are listed in the full expression reference linked at the end of this article.
Advanced Syntax
This is used to build more complex expressions with syntax similar to Excel formulas, e.g.
Hi, you are @(format_date(now(), "YYYY") - results.year_born) years old
Expressions can also include arithmetic with the add (+), subtract (-), multiply (*), divide (/) and exponent (^) operators:
Result is @(1 + (2 - 3) * 4 / 5 ^ 6) units
| Note that the expression is enclosed in parentheses to tell us where it ends. |
You can also join strings with the concatenate (join) operator (&):
Hello @("contact.first_name" & " " & "contact.last_name")
Incomplete Expressions
If an expression has mismatched parentheses or other errors, TextIt displays a red alert right away. Review the highlighted expression and correct the error before you save. This check is especially useful for conditional logic in flows, calculations in messages and webhook payloads, where an error can stop a flow from running correctly.
In the example below, the expression that works out an orientation prep date from the orientation_date field is missing its closing parenthesis, so the rest of the message is highlighted as part of the expression.

Take a look at our full expression reference here.