# Extended Handlebars Check & Groups API functions

> We improved our Handlebars support by adding new helpers to make creating checks and alerts easier, e.g. random number and UUID generators.

Source: https://www.checklyhq.com/blog/changelog-template-variables-group-api/

---

[Blog](https://www.checklyhq.com/blog/) / [changelog](https://www.checklyhq.com/blog/tag/changelog/)

# Changelog: Extended Handlebars template functions & Groups API

[Tim Nolet](https://www.checklyhq.com/blog/author/tim-nolet/)[Batuhan Icoz](https://www.checklyhq.com/blog/author/batuhan/)

May 6, 2020 · Updated May 7, 2024

Here is an overview of the features & fixes we released over the last month:

### Extended template functions

We improved our Handlebars support by adding new helpers that will make creating checks and alerts easier and more powerful.

**1. Random number and UUID generators**

In some scenario's, using a setup script just to generate some data on each check run is a bit overkill. You can now use the tags `{{$UUID}}` and `{{$RANDOM_NUMBER}}` throughout your API checks and templates. You will see them pop up in the drop down when you add variables.

**2. Handlebars conditional helpers**

We added a bunch of extra [Handlebars](https://handlebarsjs.com/) helpers. These are mostly handy when creating webhooks. Here is an example of how you could turn our own `ALERT_TYPE` variable into the strings "UP" and "DOWN".

```
{
"message": "Check is {{#eq ALERT_TYPE 'ALERT_FAILURE'}}DOWN{{/eq}} {{#eq ALERT_TYPE 'ALERT_RECOVERY'}}UP{{/eq}}"
}
```

Based on the event this would trigger either "Check is UP" or "Check is DOWN"

Two clear benefits here:

- You only need to create one webhook to inform a 3rd party system.
- You can translate Checkly terms to your 3rd party tool's term for the same concept, i.e. the "up status" of a check.

Our simple Handlebars wrapper used in our codebase is now [open-sourced at GitHub](https://github.com/checkly/handlebars) and also available as a [package on NPM](https://www.npmjs.com/package/@checkly/handlebars).

Check out the package [README](https://github.com/checkly/handlebars/blob/master/README.md) for how to utilize these new helpers.

### Groups API

You can now create, update and delete check groups via our public API. This is useful if you want to create checks in bulk that share defaults and common settings like run locations and alerting channel.

With the API you can:
- List all check groups
- Create a check group
- Update a check group
- Delete a check group
- List all checks in a check group

[Check out our API docs for more information](https://developers.checklyhq.com/reference/authentication#checkly-api-check-groups)

[Tim Nolet](https://www.checklyhq.com/blog/author/tim-nolet/)

Chief Evangelist

[Batuhan Icoz](https://www.checklyhq.com/blog/author/batuhan/)

Monitor with AI

Let your agents create & deploy monitors with deep understanding of your application

[Start for free](https://app.checklyhq.com/signup)

Share on social

Try Checkly

## Catch it before your users do

Run Playwright and API checks against production every minute, from locations around the world. Your checks live in your repo and deploy with your code.

[Start for free](https://app.checklyhq.com/signup) [Book a demo](https://www.checklyhq.com/demo-request/)

Free plan. No credit card.

# scaffold a project with example checks

$ npm create checkly@latest

# run them from our global locations

$ npx checkly test

# turn them into production monitors

$ npx checkly deploy

## Related Articles

[Post mortem: outage browser check results & alerting May 19, 2020](https://www.checklyhq.com/blog/post-mortem-outage-browser-check-results-alerting/)[Post mortem: checks with async IIFE reporting success incorrectly June 15, 2020](https://www.checklyhq.com/blog/post-mortem-checks-with-async-iife-reporting-success-incorrectly/)[How we monitor Checkly's API and Web App (updated) June 18, 2020](https://www.checklyhq.com/blog/how-we-monitor-checkly/)[Checkly Runtime 2021.10 with faker.js and updated Playwright November 23, 2021](https://www.checklyhq.com/blog/checkly-runtime-2021-10/)[It's code! Synthetic monitoring with Terraform Cloud & Checkly January 12, 2021](https://www.checklyhq.com/blog/synthetic-monitoring-with-terraform-cloud-checkly/)
