Triggered emails & paint layouts?

We've had enquiries from an editor asking about the possibility of sending out email alerts when a website is updated.


In theory triggers would be the way to go - but this would mean that all minor edits to the page would trigger an email (and we'd have some very annoyed readers!)



I got very interested recently in the possibility that paint layouts can be combined with triggers… and the sort of things this opens up. Is there any possibility that paint layout conditions could be applied to a trigger such that when it meets certain conditions the alert email is sent when a page is published - and otherwise it would not, hence stopping the spam when a comma or full stop is changed on the page? Has anyone else explored this possibility?



My initial thoughts were to use one specific user to publish the page, and then set the paint layout condition based on user. This would require the publisher to log in as a specified user in order to trigger the alert, which might be annoying. The other possibility would be to trigger an alert email by date and time.



Alternatively of course Bulkmail might be a more appropriate solution :slight_smile:

The only conditions available to Triggers are the ones on the Trigger screen itself, so the conditions used on Paint Layouts are not currently available. Still even if they were, it would be difficult to build a rule that would be totally appropriate.


Currently, I'm recommending using RSS feeds instead of email notifications. That way you just have to generate an RSS feed of all assets in your system ordered by Last Published Date. Much simpler! :slight_smile:

Couldn't you create a trigger that would send the email on a version change of the asset? Then when you are ready to send the email out, you could just update the version of the asset, and it would send out the email.

[quote]Couldn’t you create a trigger that would send the email on a version change of the asset?  Then when you are ready to send the email out, you could just update the version of the asset, and it would send out the email.
[right][post=“15847”]<{POST_SNAPBACK}>[/post][/right][/quote]



I’m not sure if there is a Major Version change trigger event, but you’re right – that would be a good solution.


I just checked, and from what I see this might not be possible. There seems to be no trigger for a version change.

This is where you should use asset statuses. Use 'Safe Edit' to make minor changes. When you're done with all the minor updates, set the asset back to 'Approved to go Live'. Have a trigger listening for 'Status Changed' event and do whatever you want with it, including sending emails.

[quote]This is where you should use asset statuses. Use ‘Safe Edit’ to make minor changes. When you’re done with all the minor updates, set the asset back to ‘Approved to go Live’. Have a trigger listening for ‘Status Changed’ event and do whatever you want with it, including sending emails.
[right][post=“15859”]<{POST_SNAPBACK}>[/post][/right][/quote]



Yeah, but if you have to make a small change, people will get notified when the asset goes Live again. There is no way (at present) to differentiate between a minor and a major change. This could be done with a major version bump event.

Minor updates can happen without changing the status, i.e. the assets stays Live. This assumes there is no workflow on the asset.

[quote]Minor updates can happen without changing the status, i.e. the assets stays Live. This assumes there is no workflow on the asset.
[right][post=“15867”]<{POST_SNAPBACK}>[/post][/right][/quote]





Ahh yes, this is what I neglected to mention - we use workflow for all users including the editor of this section. So all editing is done in safe edit, and published live by admins - even adding a comma would trigger an email.



Trigger on version change would be nice :slight_smile: - but aside from that, converting people to the notion of using RSS, or using bulkmail to do a customised mailout might be the best approach.