Hi @swetasingh4net,
I think the topic here is about templating the alert coming from the Grafana server.
We have 2 great articles which describe the alerting and templating.
The 1st one is written by a community user on this post
The second one is written by one of our team member in the following post.
I hope this helps.