# Alarm Notification Template

### What is an Alert Notification Template?

In the ChainBot platform, an alert notification template is essentially a string of text with no length limitation. Whenever a user creates a Bot, a default alert notification template is generated. Users need to modify the keywords in the alert notification template according to their own needs, and they can also modify the injected variables based on the type of Bot monitoring.

Here is an example of an alert notification template:

```
[ {$bot.name} ]
  Contract: {$event.contract}
  Time: {$block.time}
  Explore: {$chain.explore}/tx/{$tx.hash}
  Created By ChainBot.io
```

In this example, "Contract" is a keyword designed for user readability, and "{$event.contract}" is a template variable. Template variables must be enclosed in "{}".

[Learn about the different injected variables supported by Bot monitoring](/advanced-features/alarm-notification-template/message-template.md)

### Advanced Features of Alert Notification Templates

> To use these features, users need basic programming skills.

#### 1. Formatting Time

```javascript
// Format the time zone to the user's designated time zone
timezone($block.time, 8)
```

#### 2. Arithmetic Operations

```javascript
"123000000000000000000" / 1e18 == 123
"1" + "1" + 1 == 3
2 - 1 == 1
2 * 2 == 4
```

#### 3. Rounding Operations

```
{ round(1000000000001000000 / 1e18, 1)}
```

#### Complex Alert Template Example

```
[{$subscription.name}]
Block: {$block.number}
Values: {$values._reserve0 / 1e18} / {$values._reserve1 / 1e18} = {$values.percent}
Condition: {$condition}
Time: {$block.time}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chainbot.io/advanced-features/alarm-notification-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
