0

In Drupal 9 Rules 8.x alpha 7 - I have a rule working. However, I am trying to send an email to the user of the account that is changed.

I am trying to figure out the data selector to make this happen. I have tried token for an email: {{ profile.uid.entity.mail }} I have tried profile.uid.entity.mail.value as a data selector and many other things I am finding online.

I have Entity is of Bundle and Field is of type in the conditions to grab the field in the user account.

If I put in a specific email it works. Anyone figure out the data selector for this?

1 Answer 1

0

Okay, it took a while but I got it to work. I am using the Profile module with the Drupal account. This rule is on Profile update.

In the Condition: you need 'Entity is of Type' - data_selector = profile, and value = profile Then you need 'Entity has field' with data_selection = @user.current_user_context:current_user and value as 'mail'

Than...You create an Action "send Mail' - in the Send to: direct input I used this {{ profile.uid.entity.mail }} Added a message and tested.

It works!!!

Hope that helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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