I would like to execute a script once a new piece of content of a specific type has been created, but not updated. Which hook would I use for this?

I basically want to execute a script that will node_load the entity reference field and then email a bunch of users from that referenced node.


You're probably looking for hook_node_insert where $node should contain your node reference field.

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.