Skip to content

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 and run tag to run another action.


Example#

For example, you need the command to store an attribute. To do it, you need:

  1. Create a new custom command;

  2. Select the "Execute Template Code" action type;

  3. In the field "Execute Template Code" write:

    {% do member.getAttribute('MyAttribute').update('Code is work!') %}
    
  4. Save.