Template Editor
The template editor lets you create and customize message templates with a visual editor and live previews for each supported platform.
Creating a Template
- Navigate to Templates → Create Template
- Enter a name
- The editor opens with a default template structure
Editor Layout
The template editor has two main panels:
- Left: Platform Tabs + Config Editor — switch between platform tabs (Discord, Slack, Telegram, Default) and edit the JSON config for each with syntax highlighting
- Right: Live Preview — see a rendered preview for the active platform tab as you type
Platform Tabs
Each tab represents a platform variant within a v2 multi-platform template:
| Tab | Format | Description |
|---|---|---|
| Discord | Embed config | Standard Discord embed with title, description, fields, color |
| Slack | Block Kit JSON | Native Slack Block Kit blocks for rich Slack messages |
| Telegram | HTML template | HTML string for Telegram's HTML parse mode |
| Default | Embed config | Fallback used when no platform-specific variant is configured |
At delivery time, Dispatch selects the variant matching the destination type. If no matching variant is set for that platform, the Default variant is used.
You don't need to configure all platforms. Configure only the tabs you need — leave the rest empty and Dispatch will fall back to auto-formatting or the Default tab.
Discord Tab
The Discord tab uses the standard embed config format:
{
"title": "{{.Meta.EventType}}",
"description": "Event from {{.Body.repository.full_name}}",
"color": 5763719,
"fields": [
{
"name": "Action",
"value": "{{.Body.action}}",
"inline": true
}
],
"footer": "Dispatch",
"thumbnail": "{{.Body.sender.avatar_url}}",
"timestamp": true
}
The live preview renders a Discord embed matching what will be delivered to Discord destinations.
Slack Tab
The Slack tab accepts a slack_blocks array containing native Block Kit blocks. All string values inside the blocks support template expressions:
{
"slack_blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "{{upper .Meta.EventType}}"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Repository*\n{{.Body.repository.full_name}}"
},
{
"type": "mrkdwn",
"text": "*Action*\n`{{.Body.action}}`"
}
]
}
]
}
Telegram Tab
The Telegram tab accepts a telegram_html string that supports template expressions and is sent with Telegram's HTML parse mode:
{
"telegram_html": "<b>{{upper .Meta.EventType}}</b>\n\nRepo: <code>{{.Body.repository.full_name}}</code>\nAction: <code>{{.Body.action}}</code>\n\nBy <b>{{.Body.sender.login}}</b>"
}
Supported HTML tags: <b>, <i>, <u>, <s>, <code>, <pre>, <a href="...">, <tg-spoiler>.
Variable Discovery
The editor helps you discover available template variables:
- A Variables panel shows all available
.Metavariables (event ID, event type, endpoint ID, timestamp) - If recent events exist for linked endpoints, the editor shows actual payload paths from real event data so you can click to insert them
This panel is available across all platform tabs.
Assigning Templates
Templates are assigned per endpoint-destination link:
- Go to Sources
- Click on an endpoint
- Edit the destination link
- Select a template from the dropdown
You can also set up routing rules on a link to use different templates based on event field values. See Templates for details.