Skip to content

When an entry is restored

Sends a notification when an Entry has been restored from the trash.

This only covers entries that were soft-deleted and then restored from the control panel Trashed view or via restoreElement(). Entries that were hard-deleted cannot be restored, and thus never fire this trigger.

Field Conditions

Field conditions restrict the notification based on the element's content, using Craft's native conditions framework. Build a rule set against the element's attributes and field values, and the notification will be sent only when every rule matches.

Must match all conditions

The condition builder evaluates every rule with AND semantics, so each rule must pass for the notification to be sent.

Twig variables

The object variable (and its entry alias) is the restored Entry.

twig
"{{ entry.title }}" was just restored from the trash.

Examples

Notify the original author when their entry is restored

twig
Hi {{ entry.author.firstName }},

Good news, "{{ entry.title }}" was just restored from the trash by {{ currentUser.fullName }}.

View it: {{ entry.cpEditUrl }}

Acknowledge the restore to whoever triggered it

twig
You just restored "{{ entry.title }}". It's back in {{ entry.section.name }}.