1

I am working on a site for an academic conference. Right now, we have two content types (1) proposal and (2) peer review. In the proposal content type, an author can add multiple presenters to a user reference field. When the node is saved, I have a rule that loops through the user reference field and sends an email notification to all the presenters that the proposal has been submitted. Works great!

Now the question. I want to send an email to that same group of users when someone else posts a peer review. I have figured out how to notify the "author" of the proposal but I want to notify all the users listed in the node reference field.

Right now my rule is set up as follows: Event: after saving new content Conditions: content is of type > peer review Actions: Fetch entity by property: -Value: node -Value: node reference -Data selector: node Variable label: Fetched proposal Variable name: fetched_proposal

Then I have a loop: Data selector: fetched-proposal Current list item Variable label: Current proposal item Variable name: proposal_list_item

Then I have an action to send the mail. Since I've looped over the proposal connected to the peer review, I have available a token for the presenter field which contains the node reference. I've used that token in the "To" value field.

I think this should work but I don't get emails when testing.

When I check my log messages I see this error: The loop Loop () fails the integrity check and cannot be executed. Error: Data selector fetched-proposal: for parameter list is invalid.

Can anyone help me figure this out?

0

I think you are fetching the user reference wrongly. You should try this:

  • On the Action:Fetch Entity by ID
  • Value:User
  • Data selector :node:field-name:uid (this is your user reference field
  • Variable label:Fetched entity
  • Variable name :user_entity

Then you are good to go!

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.