To extend onto draav's answer, your notification template should look like this when notification needs to be sent only in case of alert
{{#is_alert}}
This is my alert content!
@[email protected]
{{/is_alert}}
This approach can be further extended when we want to notify different users for different type of notifications.
Below example sends alert notification to [email protected] and recovery notification to [email protected].
{{#is_alert}}
Something went wrong!
@[email protected]
{{/is_alert}}
{{#is_alert_recovery}}
Things are back to normal!
@[email protected]
{{/is_alert_recovery}}