Automatic Variables

The following variables will be automatically available within your Twig message template. Certain variables will (or won't) exist, depending on how each notification was triggered.

Config Variables - Always Available

Variable Availability Description
recipient All Events Individual recipient (User or email address) of each message.
activeUser All Events The logged-in User who triggered the notification.
event All Events The entire Event which triggered the notification.

Content Variables - Mixed Availability

Variable Availability Description
original On Save The original version of a saved Element.
entry Entry Events The updated Entry which triggered the notification.

# Where can I use automatic variables?

# Email Subject

For email messages, these variables are available in the subject line.

# Custom Recipients

If your message compiles a set of custom recipients, these variables will also be available within the context of your custom Twig snippet. The only exception will be the recipient variable (which cannot exist before the recipients have been determined).

# Config Variables

# recipient

Available on All Events

Individual recipient of each message. Can be either a User Model or basic email address, depending upon how the recipients were determined.

One Recipient Per Message

Each message is processed separately for each individual recipient. The entire message template will be re-evaluated with the current recipient every time it is parsed.

# activeUser

Available on All Events

The logged-in User who triggered the notification. For example, if this message were triggered when a User saved an Entry, that User would be referenced as the activeUser.

# event

Available on All Events

The Event itself, which triggered the notification.

# Content Variables

# original

Available when an element is being saved

The original version of a saved element. You can use this to compare against the modified version of the same element.

# entry

Available on Entry events

The Entry affected by this event.