How to setup a comment email-notification on Drupal using Triggers & Actions

Today I gonna show yo how to setup a comment email-notification on Drupal like wordpress. This is very simple and works perfectly. OK let's start.

[1] First let's enable the module Trigger. (Administer -> Site Building -> Modules)

drupal trigger

[2] Second let's setup Action. (Administer -> Site Configuration -> Actions) Now at the bottom Make a new advanced action select Send e-mail

and then click create. Now you get a new window with some configuration fields.

  1. Write a brief description.
  2. Write a Recipient an email address where you want your commend notifications to be send. (or you can even type %author then it will send an e-mail to the author of the original post)
  3. Write a subject

4. Write a short message

Something like this below;

New comment on %site_name

%node_url

This will create an email template with your site name and the node URL of the comment posted. You can still add or fetch more data to your email like, (%site_name,%username, %node_url, %node_type, %title, %teaser, %body).

Now click Save.

drupal action setup

[3] Assign a new trigger.

Go to Adminster -> Site Building -> Triggers and at the top click on Comments and then below choose your email subject from After saving a new comment seclection box. Now after selecting your email subject (The description name you have given to actions) click Assign.

drupal trigger assign

That's all very simple next try to submit a new commend and then check your email.