Slack
Slack Template
๐ Template
You can create the template while creating an Event with Slack channel enabled. You can easily create/update the template content by editing the event.
Raven supports both text and block-kit format for creating slack messages.
Hereโs how you can add a blocks message in the template section of the Event.
Dynamic Content
To pass dynamic or custom data in the template like invoice number, user name,
tracking link etc., you should wrap it within handlebars {{ user_name }}
.
Raven uses Handlebars.js
to parse the template and all handlebar operations are supported. Following
Handlebars expressions are supported within templates:
- Nested objects
- #if, #each, #with
You will need to pass the value of the variables in the data object of Send Event API.
Example
Slack Template
data
object in API: