Values and formulas
Steps pass information to each other as values. This page covers how to insert a value into a setting, and how to calculate a new one.
Insert a value
Put a value in double curly brackets to insert it into a title, message, URL or any other text field.
| You write | You get |
|---|---|
{{leadname}} | A value from the trigger. The builder lists the values each trigger offers. |
{{steps.<step id>.<field>}} | The result of an earlier step, for example {{steps.fetch.status}}. |
{{body.orderid}} | A field from the JSON sent to a Webhook received trigger. |
{{loop.item.name}} | The current item inside a Repeat step. |
If you write a value the trigger does not offer, for example a misspelt {{leadnmae}}, the automation is not saved and the step shows which value is unknown. This stops the raw text reaching a customer. A Webhook received trigger accepts any {{body.<field>}}, because its JSON is yours to choose.
Calculate
The Calculate action works out a value and changes nothing. Later steps read it as {{steps.<step id>.result}}.
A formula reads values by name, without curly brackets:
| You write | Meaning |
|---|---|
amount | A value from the trigger. |
steps.fetch.status | A value from an earlier step. |
loop.item.amount | A value from the current repeat. |
now | The time the run started. |
Examples:
round(amount * 0.1 * 100) / 100 10% of an amount
date(now) + duration("72h") a date three days later
sum(map(items, #.amount)) the total of a list
len(items) how many items are in a list
fromJSON(steps.fetch.body) turn JSON text into values
random(1, 100) a whole number from 1 to 100
budget > 50000 ? "large" : "small" choose between two valuesFormulas support arithmetic, comparisons, text joining with +, and functions for numbers (round, floor, ceil, min, max), text (upper, lower, trim, split), lists (len, sum, map, filter, first, last) and dates (date, duration, now).
A formula is checked when you save. A formula that cannot be read is refused with the reason. A formula cannot reach the network or change a record.