Auto Apply template function

Auto Apply template function

Hi, I want to automatically apply an email template when creating a reply to a ticket. I know this can be done in custom functions but Im having some trouble with deluge. Is there any assistance you can provide