How can I set a variable in the body of a node?
take a look at What is best method for token replacement within node content?

If you are feeling lack of available tokens, you can extend it with tokens hooks.