Token replacement

When in direct input mode, values enclosed in "{{" and "}}" are recognized as Rules tokens. (Note - these are NOT the same as core Drupal tokens). Rules tokens use this Twig-like syntax for consistency with other parts of Drupal.

When the rule is executed, the token will be replaced by an actual value. For example, if you are reacting to a "Content updated" event, you can use an action to send an email with the subject "Content {{ node.title }} was updated." In this case, the "Send email" action will replace the token with the actual title of the content that was updated.

Data filters may also be used within tokens. The syntax is: {{ variable | filter }} For example, {{ node.title | default('Default title') }}. Note that whitespace inside the "{{" and "}}" is ignored, so you can use whitespace to improve readability.

Available tokens

How to find out what tokens are available for use

Data filters

Data filters are plugins for the Typed Data module that are used to manipulate a token value for display

Guide maintainers

TR's picture