1

I have an "Authors" Content-type, that users can add to their "Article" node while adding a new content as Co-Authors.

Note that it's a seperate content-type not users.

in "Authors" content-type I have an "Email field" which contains the email of the co-author.

What I want to do is using rules, send an email to the referenced node's email field

I juggled around in rules but couldn't really make it work, I'd really appreciate a step-by-step process of rules to achieve this, thanks.

1

If your rule is set to React on event: Before saving content or After saving new content of type Article, then do this:

Add condition: Entity has field

ENTITY: node:field-your_reference_field

FIELD: field_email

This makes the referenced node's email field available in to Actions. So then you can

Add action: Send email

To: node:field-your_reference_field:field_email

This should get you where you need to be.

  • Thanks a lot man, it works fine, but there's another issue which is that the referenced field can have multiple values, while I'm adding the field it asks for node:referenced-author:0 or 1 and 2 3 4, so I guess it works for just one user, I'd appreciate it if you can guide me how to fix this – Sohail Aug 11 '14 at 16:59
  • Sure, you should be able to do this within a Rules Loop. + Add loop and then for the list item choose your field and then create your send email action inside of the loop. – Link Swanson Aug 11 '14 at 19:03

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.