The functionality described in this article is available in versions 1.5 and greater.
Create "Templates" Using Variables
Messages can include a combination of text and variables.
Example 1
In the example below, a query is sent within the message. The word “Query” is text. The remainder of the message allows a variable to be inserted.
Query: ${ActionProperty.query}
Example 2
This is an example of a message for the QueryToSlack action.
*RepositoryID:* ${ActionProperty.repositoryID}
*Dashboard:* ${ActionProperty.dashboardName}
*Viewlet:* ${ActionProperty.viewletName}
*Query:* ${ActionProperty.query}
*Error:* `${ActionProperty.errorMessage}`
Example 3
This is an example of a message for the LinkToSlack action.
Check out viewlet *${ActionProperty.viewletName}* here: ${ActionProperty.link}
Message Formatting
Slack messages can be formatted using mrkdwn. For example, to make text bold, add asterisks around it, as shown here:
*Query:* ${ActionProperty.query}
For more Slack message formatting options, see
https://api.slack.com/reference/surfaces/formatting.