Edit Template

SuprSend provides two ways to design Slack templates:
  • Text Editor: For simple text-based messages with variable interpolation
  • JSONNET Editor: For rich, interactive templates using Slack’s Block Kit with buttons, images, and complex layouts

Text Editor

The text editor is ideal for simple text messages with variable content. You can add variables in Handlebars syntax as {{...}}. If the output has special html text, enclose variable in triple curly braces as {{{url}}} to avoid HTML escaping.
New Signup request in ABC company

UserName: {{user_name}}
Email: {{user_email}}
Organization: {{org.name}}
Domain: {{org.domain}}

JSONNET Editor

The JSONNET editor enables rich template design using Slack Block Kit Builder. This allows you to create interactive templates with buttons, images, checkboxes, and styled text. It is essentially JSON template where variables can be added in JSONNET syntax as data.variable_name or data["$variable_name"]. Slack Editor Demo

Template Examples

Adding dynamic content

Here’s how you can different types of variables in both handlebars and JSONNET syntax.
Variable TypeHandlebars SyntaxJSONNET Syntax
Parent Level variables{{user_name}}data.user_name
Nested Object{{org.name}}data.org.name
Print Array element at Index{{task_list.[0].task_name}}data.task_list[0].task_name
Recipient{{$recipient.name}}data["$recipient"].name
Actor{{$actor.name}}data["$actor"].name
Tenant{{$tenant.brand_name}}data["$tenant"].brand_name
Print each item in the Array
{{#each task_list}}
{{task_name}}: {{task_description}}
{{/each}}
Conditional Logic
{{#if is_new_org}}
New Organization
{{else}}
Existing Organization
{{/if}}
Batched Template
Total events: {{$batched_events_count}}

{{#each $batched_events}}
{{item}}
{{/each}}

Preview Template

  1. Add mock JSON data using the Mock data button for all variables used in the template
  2. Click Load Preview to see the rendered template
  3. For JSONNET templates, click View in Slack Block Kit to see the actual Slack UI preview
You must add mock data for all variables in your template. Missing mock data will cause rendering errors and prevent the preview from loading.
Slack Preview Demo

Publish Template

Once your template is ready, click Publish Draft and provide a version name to publish it. The published template becomes the live version and will be used whenever the associated workflow is triggered.

Test Template

Use this option to send a test message in Slack and preview how it will appear in user’s device. Click the Test button, then enter the user’s distinct_id and select the Slack channel where the test message should be sent.
Template testing only uses the published Live version, so make sure to publish your changes before testing.

Promote to Production

You can clone template across workspaces by using Clone -> Outside Template option. Clone -> Within template can be used to clone within different languages and versions of the same template.
Best Practice: Always design templates in your staging workspace first, then promote them to production. This ensures thorough testing of the changes without impacting end users.