emailing users in user reference field with rules

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?

Sponsored by SupremePR
This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

emailing users in user reference field with rules

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.