Execute Template Code
"Execute Template Code" action type is used to execute functions of template engine.
How it is useful?#
You can create an action that will execute template code, perform some action and respond with simple success message.
The behavior and settings#
-
The Code to execute is a field where you can enter your code that should be executed.
-
If your command should respond something you want, consider using Send Message action instead or use
parameters.store
to store the result andrun
tag to run another action.
Example#
For example, you need the command to store an attribute. To do it, you need:
-
Create a new custom command;
-
Select the "Execute Template Code" action type;
-
In the field "Execute Template Code" write:
{% do member.getAttribute('MyAttribute').update('Code is work!') %}
-
Save.