2

I have the Rules and Flag modules installed. I want other users to be notified of flagged user new content.

I made 2 rules:

  1. To add the author of content to bookmarks of user:

    screenshot

  2. To send an e-mail notification when bookmarked (flagged) user created new article:

    screenshot

But it sends an e-mail only to the user who created the article.

What am I doing wrong?

  • do you want your workflow to be available in Rules itself. Everything is possible with some coding.drupal.org/node/905262 – niksmac Mar 11 '13 at 17:11
  • I don't have an equivalent use case, so I can only suggest. Chained tokens are available under the Send Mail action, even if they are not listed. You might try something like To:[node:flag-bookmarks-user:mail], or you might have to use a php snippet to retrieve the individual user email addresses (also supported). – Triskelion Mar 11 '13 at 18:04
1

As i can see in your Actions - Send mail - To:[site:current-user-mail]. You need to create action Send mail and chose 'Send mail to all users of role` - and chose roles for which you want to send mail.

  • If i choose this, i'll send mail to all users of that role. i want to send onlt for users who bookmarked the author – AlexEfremo Mar 11 '13 at 16:30
0

Mistakes in your current rules

The Rules Action in your 2nd rule is to send an e-mail only to [site:current-user-mail].

Since this rule is using Rules Event "After saving new content", the user who is actually saving that new content will receive that eMail. But, that user is also [site:current-user-mail]. So your rule "works as implemented", though that is obviously not what you want.

Moreover, you are only sending an eMail to only 1 user, instead of some type of list of users, i.e. all users who bookmarked (flagged) the author.

How to get it to work

To make this work you may want to give it a try to process the results of a VBO enabled view via Rules, whereas your rule performs 2 Rules Actions:

  • Load the VBO list that you want to be processed.
  • Add a loop to perform a Rules Action, for each row contained in your Views results.

Some more details about the VBO-view you'd have to create for this:

  • The view should list all users who have bookmarked (flagged) the author or the newly saved node.
  • It should include an appropriate filter for the userid of the node author.
  • It should have exactly 1 result (row) for each user to be eMailed.
  • One of the columns should be the eMail Id (I don't see other columns needed for this to work).

For more details, have a look at the tutorial "How to process the results of a VBO enabled view via Rules?".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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