-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚩 Add support for more trigger events #2
Comments
Whatever you do for entries, I'd like to see for Commerce Products, Digital Products and Users. Thanks! :-) |
Noted! 🙂 |
Is on save/entry and publish entry the same? One could save to a draft, and technically save. I'm not sure the controller actions on this in Craft. |
That's a great question. All saved entries will trigger this event, so it's really a matter of filtering to get the behavior that you want...
There are a lot more subtleties and nuances to the "On Entry Save" event, including plenty of stuff that I'm still trying to wrap my head around. It's quite possible that these two filters will evolve into something more significant down the road. |
Do you plan on adding the ability to further filter saved new entries, for example, if entry is new AND a specific lightswitch field in enabled? Another example would be if the status of a entry is changed from pending to enabled, can an email be sent to the author of that entry? |
The very short answer is "yes". All of those features are on the roadmap. 🙂 The longer answer... as a workaround, you can take advantage of these two existing features to achieve your goals...
Here's some rough pseudo-code... {% if entry.myField != 'value that I want' %}
{% skipMessage %}
{% endif %}
Yup, absolutely! When editing the Message in the control panel, select Custom > Users and specify the author of each Entry. {# Encode the Entry author's ID #}
{{ [entry.author.id]|json_encode }} ^ Fair warning, we may change the "Custom" behavior before 1.0 is released. Handling this logic in Twig is complicated and clunky, we may move the customization logic into PHP. |
Agreed with @AndrewMac - Whatever you do for entries, I'd like to see for Commerce Products, Digital Products and Users. 😃 |
Just got another vote for User events and Solspace Calendar events. Hoping to get to this soon (for anyone following this thread). 🤞 |
+1 request for the "on save user" event (per @darylknight). |
Lindsey, is an asset upload trigger possible from a front-end user form? |
@johnj24 I believe so. You want a trigger for when the file is uploaded (not when the Asset is saved). Is that correct? |
@lindseydiloreto I guess ideally both, but for now I think all I'm looking for is on upload. I have a client looking to be notified when a user uploads a file through a front-end form. The user does not have the ability to save any file changes beyond that, if that's what you mean? |
I'd like the event to only fire on the set post date and time. If I set the post date of an entry in the future, the email will be sent on entry save, not on entry postdate. But the entry is not yet visible on the front end. |
I am currently using Percipio's "Notifications" plug-in but the Craft 3 version is incompatible with PHP 8.1 and 8.2. I am looking for an alternative. I am using it to send emails to users when they are added to specific user groups. For example: "You're membership has been approved, your discounts will automatically be applied at checkout" when an admin manually adds them to a specific user group. Is that a possibility for v.1 ? |
Hi @timprint, great question. Yes, that feature will definitely be possible in v.1. 👍 I've been doing a lot of work on v.1 lately, there have been some significant changes since the original beta version. Feel free to ping me on Discord if you want to get a sneak peek! |
At the moment, only a current event is supported:
This can (and should) be easily expanded to cover other events:
I'm not sure when each particular event will be supported... Feel free to leave a comment if you have a preference! 🙂
The text was updated successfully, but these errors were encountered: