Alert Templates

Customize the Slack and Microsoft Teams notifications sent by your Bolt Schedules. Using Jinja2 syntax, templates let you control exactly what your alerts say, surfacing the run context your team needs, in the format that works for them.

circle-info

Templates are created once in the Alert Templates page and can then be attached to any channel destination across your schedules.


Creating a Template

  1. Navigate to Bolt > Alert Templates in the top navigation

  2. Click + New Template

  3. Give your template a name

  4. Write your message using plain text, template variables, and Jinja expressions

  5. Save the template

Attaching a Template to a Schedule

  1. Open the Bolt Schedule you want to configure

  2. Navigate to the Notification Settings tab

  3. Under Notification Destinations, locate the Slack or MS Teams channel you want to customize

  4. Select your saved template from the template dropdown on that channel row

  5. Click Deploy to save your changes


Template Variables

Templates use Jinja2 syntax. The following variables are available:

Variable
Description

{{ schedule_name }}

Name of the Bolt Schedule

{{ schedule_owner }}

Owner email of the schedule

Filters & Helpers

Syntax
Description

{{ start_dttm | date_format('YYYY-MM-DD HH:mm') }}

Format a datetime string. Supported tokens: YYYY, YY, MMMM, MMM, MM, DD, HH, mm, ss

{{ duration(start_dttm, end_dttm) }}

Compute duration between two datetime strings


Example Template

Last updated

Was this helpful?