Expressions
Write dynamic expressions to transform data, make comparisons, and build logic in your workflows
Expressions let you go beyond simple variable references. Use them to transform data, compare values, and build dynamic logic.
Static vs Dynamic Mode
Most fields in Flint have two modes:
- Static Fixed value, like
Hello World - Dynamic Expression that evaluates at runtime, like
"Hello " + trigger.name
Click the toggle next to any field to switch between modes.
Use dynamic mode when you need to combine values, do math, compare things, or conditionally change output.
Basic Syntax
Expressions use a simple, readable syntax.
Variable References
Reference data from the trigger or previous steps:
trigger.customer_name
steps.extract_invoice.total
steps.api_call.response.statusCombining Text
Concatenate strings with +:
"Order #" + trigger.order_id + " is ready"
"Hello, " + trigger.customer.first_name + "!"Math Operations
Standard math operators work as expected:
steps.extract.quantity * steps.extract.unit_price
steps.subtotal + steps.tax
trigger.amount / 100
steps.total - steps.discountComparisons
Build conditions using comparison operators:
| Operator | Meaning |
|---|---|
== | Equals |
!= | Not equals |
> | Greater than |
< | Less than |
>= | Greater than or equal |
<= | Less than or equal |
Examples:
steps.extract.amount > 1000
trigger.status == "approved"
steps.count != 0Logic Operators
Combine conditions with && (and) and || (or):
steps.amount > 1000 && trigger.is_priority
trigger.type == "urgent" || trigger.type == "critical"Use ! for negation:
!steps.is_duplicate
!(trigger.amount < 100)Working with Text
Working with Lists
Access items by index (starting at 0):
trigger.items[0]
trigger.items[0].name
steps.extract.line_items[2].priceCheck if something is in a list:
"admin" in trigger.user.roles
trigger.category in ["electronics", "appliances", "furniture"]Get the size of a list:
size(trigger.items)
trigger.items.size() > 0Working with Objects
Access nested properties with dots:
trigger.customer.address.city
steps.response.data.results[0].idCheck if a property exists:
has(trigger.customer.phone)Type Conversions
Convert between types when needed:
int(trigger.quantity)
double(steps.price)
string(steps.order_number)Conditional (Ternary) Expressions
Choose between values based on a condition:
trigger.amount > 1000 ? "High Priority" : "Normal"Nested conditions:
trigger.type == "urgent" ? "🔴" : trigger.type == "normal" ? "🟡" : "⚪"Common Patterns
Default Values
Use a fallback if something might be empty:
trigger.company_name != "" ? trigger.company_name : "Unknown Company"Building Dynamic URLs
"https://api.example.com/orders/" + string(trigger.order_id) + "/details"Formatting Currency
"$" + string(steps.extract.total)Checking Multiple Conditions
trigger.amount > 5000 && trigger.is_new_customer && !has(trigger.manager_approved)Quick Reference
| Category | Syntax | Example |
|---|---|---|
| Variable | source.field | trigger.email |
| Nested | source.a.b.c | trigger.user.address.city |
| Array | source.items[n] | trigger.orders[0] |
| Concat | + | "Hi " + name |
| Compare | ==, !=, >, < | amount > 100 |
| Logic | &&, ||, ! | a && b |
| Ternary | ? : | x > 0 ? "yes" : "no" |
| In list | in | "a" in list |
| Has prop | has() | has(trigger.phone) |