How can I use the Courier plugin to notify a user when an entry is enabled? Moderation scenario:


Registered user publishes an entry using a front-end form that sets the entry to disabled.
Moderator receives email re new entry and changes status from disabled to enabled in the CP.
User receives email informing them that the entry has been enabled.


I’ve got steps 2 &amp; 3 working using both the Courier &amp; Postmaster plugins independently. However, when the user edits their entry via another front-end-form, they also receive an email notification.

How can the user be notified only when the entry has been edited and the entry's status has been changed from disabled to enabled?

Courier blueprints:

Step 2: Triggers: entries.onSaveEntry and Conditions: {{ entry.sectionId == '3' and isNewEntry ? 'true' : 'false' }}

Step 3: Triggers: entries.onSaveEntry and Conditions: {{ entry.sectionId == '3' ? 'true' : 'false' }}
In your Courier Blueprint listen to entry.beforeSaveEntry events and use this code for the Trigger Condition:

{% set oldEntry = craft.entries({
    id: entry.id,
    status: null,
}).first() %}

{%- set wasDisabled = oldEntry.status == 'disabled' %}
{%- set isEnabled = entry.status == 'live' %}

{{- wasDisabled and isEnabled ? 'true' : 'false' }}