Rules

Access entity field with custom token

Once working on the Drupal project, I faced a situation when I had to access the current loaded node fields in Rules. To be more specific, the content type had an email field and attached entity form. The task was to send the email using Rules to the email address which was set in a node field after submission the attached entity form.

The problem is that the only available fields I had were entity form fields and no fields from the node. So I came up to some custom and quick solution of creating custom Token which would contain the data from the node field.