Email template - Unmatched end

Hi all,

Quick question. With the following template:

##########
Alert Description: {check_result.resultDescription} Date: {check_result.triggeredAt}
Stream ID: {stream.id} Stream title: {stream.title}
Stream description: {stream.description} Alert Condition Title: {alertCondition.title}
{if stream_url}Stream URL: {stream_url}${end}

Triggered condition: ${check_result.triggeredCondition}
##########

{if backlog}Last messages accounting for this alert: {foreach backlog message}
Message: {message.message} Source: {message.source}
Full Message: {message.fields.full_message} {end}{else} {end}

I’m getting an “unmatched end” when testing the alert. Any tips?

Thank you!

You’re missing a few dollar signs in your template.

Here’s the reference for the template engine which is used for rendering the notification templates:
https://cdn.rawgit.com/DJCordhose/jmte/4.0.0/doc/index.html

Take a look at the default (working) template and work your way from there:

That’s awesome! Thank you very much! I was looking for a working template but didn’t feel like writing down from the image in the documentation :slight_smile:Thanks for this!

Now that I got this part working, I realized something else …

I’ve read the message only exists inside the context that we have in the template that was posted. Does this mean that I can’t include the message if it’s the first time an event takes place?

With the following template, I’ll never get the first message of an event. Or am I missing something?

Thank you!

What exactly do you want to achieve?

Basically trigger an alert with the content of the “message” field. From some quick testing, I noticed I only get the message if it is a reoccurrence, but I might have done something wrong.

What exactly did you do to achieve that?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.