0

I created a flag called flag-follow for nodes and a rule when a user reads a node is has interest in and wants to follow the activity of this specific content. He clicks on a "Follow" button. So far, so good.

In rules he should be notified by email when the content is updated or if a new comment related to this content is written.

Do I need to create a individual rule for each action? Only the first action is firing rules.

enter image description here

0

your question is a litle bit confusing, i'll do my best to answer it.

Do I need to create a individual rule for each action? Only the first action is firing rules.

You'll need 2 rules, one for node 'flagged & uptaded' (rule 1) and one for new comment (rule 2)

Rule 1: add a condition: entity is of type: your content type, this will make accesible your node. second condition: node is flagged, Actions: Loop your list and send emails.

Rule 2: restrict content type. enter image description here

then condition: node is flagged (parent node of new comment) Actions: Loop your list and send emails.

done.

EDIT: Due to your comment, your problem is in your loop, insted use views rules module, build two rules-views on NODES to load only UID's and agregation (one rule for every rules-view, view 1 for rule 1, view 2 for rule 2) with your flag relationship and propper filters to show only 'flagged nodes' or 'new commentes on flaged nodes'(one for node, one for comments), load the views-rules of UID's and inside view-loop send your emails, here is a similar situation that explain how to use views-rules module How to configure the CONTEXTUAL FILTER in a View for Rules?

  • Thing is when user B is following user's A comment action from flagged node, user B does not receive the message even after refresh – user20594 Sep 4 '18 at 9:45
  • I edited my answer – pinueve Sep 4 '18 at 9:54
  • Do you know if there is a simpler method to achieve this with only rules? The flag works, but the new comment doesn't fire. – user20594 Sep 4 '18 at 10:16

Your Answer

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