This will let you perform actions after the template is inserted. Just change the code in the middle: