Adds template and tag to message payload