4

I have two content types: job posting and job application.
The job application content type has a node reference field for job posting. Whenever users create a job posting node, other users can send a job application to that job posting by filling the fields.

How can I send a notification to the user who had posted the job application node when the node has been created?

2 Answers 2

8

Sure, with the Rules module create a new rule with this configuration:

  1. At admin/rules/trigger/add choose a name for your rule

  2. In the Event dropdown choose After saving new content and click 'Save changes'

  3. Add a condition of: Content has type under the Node heading in the conditions dropdown

  4. Add an action of: Load a referenced node under the CCK dropdown heading and choose the node reference field you want to use (the one in the job app content type) and click 'Save'

  5. Add another action: Load a user account under the User dropdown heading. In the User id field, add <?php print $referenced_node->uid; ?> and click 'Save'

  6. Add a third action: Send a mail to a user under the System dropdown heading, changed the Recipient dropdown to Loaded user and configure the Sender, Subject, and Body of the email and click save.

Now when a user creates a job application an email will be sent to the user who created the referenced job posting (assuming there is a value in the node reference field, it should be required).

0
1

For D7

you can try something like this

Conditions:

Entity has field >>>> select your entityreference field

Actions: Fetch entity by id >>>> node:your-reference-field:nid (this should pull data from the node that is referenced via your entity reference field)

Now, if the email field is on your referenced node that should become available when you drill down

eg: node:your-reference-field:field-email

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.