Grafana,templating

Hi Community,

Need help with the following problem:

I have a post request to send data to influxdb as below:

“curl -s -X POST {TELEGRAF_URL} --data-binary 'ab_loadtest_connect,url={params.TEST_URL},Connect_min={value_min[0]},Connect_max={value_max[0]},Connect_mean={value_mean[0]} {loadtestStartTime}000000’”)
sh(script: “curl -s -X POST {TELEGRAF_URL} --data-binary 'ab_loadtest_processing,url={params.TEST_URL},metric=processing Processing_min={value_min[1]},Processing_max={value_max[1]},Processing_mean={value_mean[1]} {loadtestStartTime}000000’”)
sh(script: “curl -s -X POST {TELEGRAF_URL} --data-binary 'ab_loadtest_waiting,url={params.TEST_URL},metric=waiting Waiting_min={value_min[2]},Waiting_max={value_max[2]},Waiting_mean={value_mean[2]} {loadtestStartTime}000000’”)

I have grafana dashboard plotted but need to templatise the metrics of all of them How do I do that? so as the template will show selective metrics for a time range of for example last 7 days