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 must respond with specific message, consider using Send Message action instead or use run tag to run another action and pass some parameters into it.

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:
    JuniperBot Template
    {% do member.getAttribute('MyAttribute').update('Code is work!') %}
    
  4. Save.

All rights sniffed.