Text Replacement
Before each action runs, the text replacement engine fills in the actual values for any variables you typed in the action's fields. The engine's syntax is similar to the syntax for mustache and handlebars templating engines, and you should be able to make quick sense of our text replacement engine if you are familiar with mustache or handlebars.
What Does it Do?
The text replacement engine turns text templates into finished text by filling in data wherever the template refers to it. The data can include parts of an inbound email and information from previous actions. The text template is what you have configured within our console when setting up your rules and actions.
For example, if you wanted to insert the subject line of an email, you could use an expression like this:
{{email.subject}}
The power of a text replacement engine comes when you see how you can combine multiple pieces of information. Here's an example of a confirmation email you may want to have sent to your users after they open a new ticket:
Dear {{email.from.display}},
We have received your request titled {{email.subject}}, and we have created a new ticket in our ticket management portal. If you have any further updates about your issue, please contact our office and reference ticket number {{custom.TicketNumber}}.
Thank you,
IT Support Team
In this example, the email sent to the user includes the user's actual name, the subject line of their email, and the ticket number created from their email.
Where Does the Data Come From?
The variables available in text replacement depend on what starts the automation and where the action runs, such as Email Processing, Scheduled Tasks, a macro, an Agentic Action, or a PSA Workflows event subscription. For example, {{email.subject}} and the other email variables contain details of the inbound email, custom variables contain results from previous action steps, and input variables contain the values passed into a macro.
See Variables for a full explanation of each group of variables and where you can use them.