On my D8 site I have configured an action of type "Send email" using the Drupal Core "Actions" module (module can be installed under "Administration > Extend"). I want this Drupal Core action to trigger when a new comment is submitted.

In D7 there was another Drupal Core module named "Trigger" which allowed me to configure the desired trigger. In D8 there's no longer a "Trigger" module, nor can I find any other means to configure any Drupal Core action triggers. In the D8 docs I have found this not-very-helpful paragraph:

In D7, there are triggers defined, supporting the core Trigger module. This is not supported in D8.

My general question therefore is: How can I configure a D8 site to trigger an action that was defined via the Drupal Core module "Actions" when a certain event occurs? Specifically in my case: How can I trigger a "send email" action when a comment is submitted?

As the title of this question mentions, I don't want to write PHP code to achieve this. I am willing to install a stable third-party module, though, as long as it cooperates with the Drupal Core "Actions" module.

In a wider sense, I am trying to understand what the Drupal Core "Actions" module does. To me, the module seems to be quite useless if as a site admin I cannot configure triggers for its actions.

  • In your specific case the commment notify module would be helpful. From description, > Comment Notify is a lightweight tool to send notification e-mails to visitors about new, published comments on pages where they have commented. Comment Notify works for both registered and anonymous users. Otherwise is could be done using Rules I think.
    – user72672
    Oct 17, 2018 at 10:46
  • 1
    No, I absolutely think the same. I actually "hate" Rules. :-#
    – leymannx
    Oct 17, 2018 at 13:02
  • 1
    I mean you want Rules without using Rules. The only route is custom code.
    – Kevin
    Oct 17, 2018 at 13:07
  • 1
    I don't insist on it, I prefer not to use Rules. Trigger was removed from D8 in favor of Rules. But short of using Rules, the only way you will get configurable event/action UI is by using it - or writing code (the way I prefer since its far smaller). See: drupal.stackexchange.com/questions/246353/…
    – Kevin
    Oct 17, 2018 at 13:23
  • 2
    In this specific case, the smallest amount of code I can imagine is something like hook_comment_insert (or presave, check isNew), if true, call the action as demonstrated in the link provided.
    – Kevin
    Oct 17, 2018 at 13:25

1 Answer 1


You should have a look at ECA - event, conditions, actions: https://www.drupal.org/project/eca

  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Feb 17, 2023 at 13:40
  • I no longer use Drupal - always new features while reported bugs never get fixed despite provided patches, and too much hassle updating with every new version and finding out that plugins no longer work.
    – herzbube
    Mar 10, 2023 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.