Use record values in emails, messages and API requests
Email templates, message templates and API requests are written once and then filled in for every record a process handles. You mark the places where a record's value should go with a token. When the process runs, AutomatedOn swaps each token for that record's value.
Token formats
| Token | What it does | Where it works |
|---|---|---|
$$FieldName$$ | Replaced with the record's value for that field. | Email templates, message templates, API requests |
{aoParam:FieldName} | Exactly the same as $$FieldName$$, in a different spelling. | Email templates, message templates, API requests |
$$FieldName:dd MMMM yyyy$$ | Replaced with a date field, reformatted using the pattern after the colon. | Email templates and message templates only |
{aoDynamicDays:N} (also Minutes, Hours, DaysAtMidnight) | Replaced with a date and time worked out when the request is sent, N units from now (in UTC). | API requests only |
Where the values come from
For each record, AutomatedOn builds a list of values that tokens can use:
- The record's own fields. Use the name in the As column of your dataset's Select list. For example, if the dataset selects
Customer/EmailasCustomerEmail, the token is$$CustomerEmail$$. - Values added by rules, such as
$$RULESET_SUMMARY$$, the summary of which rules matched. See the rules guides for how the summary is built. - The process's parameters. Any parameter set on the process can be used as a token too. If a record field and a parameter have the same name, the record field wins.
Token names are case-sensitive
The name must match exactly. $$firstname$$ will not pick up a field called FirstName.
Formatting dates
Dates usually arrive looking like 2026-07-14T11:00:00Z. To show a friendlier date in an email or message, add a colon and a .NET date format pattern after the field name:
$$RenewalDate:dd MMMM yyyy$$ shows as 14 July 2026.
$$AppointmentDate:dddd d MMMM 'at' HH:mm$$ shows as Tuesday 14 July at 12:00.
Good to know:
- If the value includes a time zone (it ends in
Zor an offset such as+01:00), it is converted to UK time first, so the time shown is GMT in winter and BST in summer. - If the value has no time zone, it is formatted exactly as it is.
- If the value is empty or isn't a date, the pattern is ignored and the raw value is used. A wrong pattern never stops the send.
- Date patterns only work in email and message templates. In an API request,
$$Field:pattern$$is replaced with the raw value and the pattern is ignored.
What happens if a token can't be filled in
- On the Test tab, any action with an unfilled token is flagged as an issue, for example
Unresolved parameter in Body. - In a real run, an email or message is still sent, and the unfilled token appears in it exactly as you typed it. Always test after adding a new token.
- In a real run, an API request with an unfilled token is not sent, and the step fails.