Skip to main content

Jsonnet Blocks


Availability: Slack, Microsoft Teams

Jsonnet is a JSON to JSON templating language, which means that combining Jsonnet with your user data allows you to build and send dynamic, custom Slack blocks and MS Teams Adaptive Cards in your notifications.

New Jsonnet Block

Data Properties

Reference the data object properties using data("variable") syntax, as shown in the screenshot above.

Use Cases

  • To help you build common Block Kit actions with Jsonnet, Courier has several Jsonnet template blocks to choose from such as buttons, drop-downs, images, and more.
  • You can also build your own Block Kit elements from scratch. The Jsonnet Block expects a single Block Kit element or an array of elements.

Read more: Content block basics


Designing Slack Notifications using Block Kit and Jsonnet