Grafana email alerting

Kindly let me know how we can add subject in grafana templating and how to set if the CPU usage is going up , if it is going atleast 30mins then data should come. Kindly can anyone help with this