doublesecretagency / craft-notifier
First-class Notifications for Craft CMS
Package info
github.com/doublesecretagency/craft-notifier
Type:craft-plugin
pkg:composer/doublesecretagency/craft-notifier
Requires
- craftcms/cms: ^4.5.0 || ^5.0.0
- league/html-to-markdown: ^5.1
- nystudio107/craft-code-editor: ^1.0
- nystudio107/craft-twig-sandbox: ^4.0.2 || ^5.0.2
- twilio/sdk: ^7.14
Requires (Dev)
- phpunit/phpunit: ^10.0
README
Notifier plugin for Craft CMS
First-class Notifications for Craft 4 and Craft 5.
Event Types • Message Types • Recipient TypesIt can best be explained with the following formula:
When an [EVENT] occurs, send a [MESSAGE] to designated [RECIPIENTS].
There are endless reasons why you may need a combination of these event/message/recipient types, for example...
- Email a welcome message when a User registers
- Text the warehouse when an order is paid
- Send a Slack message when an RSS feed updates
- Post to Bluesky when a new entry goes live
... and so much more. For more details, see the complete documentation.
How It Works
Event Types
Trigger notifications from a variety of events, including Entries, Assets, Users, Craft Commerce, Digital Products, Solspace Calendar, or even watching RSS/JSON feeds.
Message Types
Regardless of the trigger, you can send a message via email, SMS, Slack, ntfy, Pushover, Bluesky, a control-panel Announcement, or Flash message.
Recipient Types
Messages can be sent to many recipients, including Dynamic Recipients for cases where the recipient is determined at runtime.
Write Messages in Twig
All messages can be composed using normal Twig, including a set of special variables available at runtime. Each message renders through a configurable Twig sandbox.
Personalize the message
Hi {{ recipient.firstName }}, the entry "{{ entry.title }}" was just updated.
Show what changed
The title changed from "{{ original.title }}" to "{{ entry.title }}".
Dynamic Recipients
When you need to determine the recipient at runtime, use Dynamic Recipients and pass the target into the {% setRecipients %} tag:
{% setRecipients entry.author %}
Field-Level Conditions
Detect changes to specified fields, and only send a notification when those fields have changed (or match a specific value).
Notification Log
Every outgoing message is logged, giving you a detailed view of how each message was handled. Restrict log growth with the logRetentionDays and logRetentionRecords settings.
How to Install the Plugin
To get started, see the complete installation instructions ➡️
Further Reading
If you haven't already, flip through the complete plugin documentation.
And if you have any remaining questions, feel free to reach out to us (via Discord is preferred).
On behalf of Double Secret Agency, thanks for checking out our plugin! 🍺