ChainBot Docs
English
English
  • 🎉ChainBot Introduction
  • ☺️Quick Start
  • 🚀Basic Usage
    • 🤖Monitoring/Bot
      • Transaction Bot Monitoring
      • Event Bot Monitoring
      • DEX Bot Monitoring
      • Value Bot Monitoring
      • NFT Bot Monitoring
      • Snapshot Bot Monitoring
      • Block Bot Monitoring
      • Arweave Bot Monitoring
    • 🧲Lists
      • Create List
      • Manage List
    • 📝Contract Management
      • Add Contract
      • Manage Contract
    • 📮Notify Channels
      • Email
      • Slack
      • Discord
      • Telegram
      • DingTalk
      • Pushover
      • Pagerduty
      • Webhook
      • Lark
      • Cobo Argus
    • 🔔Subscription
  • 💻Advanced Features
    • Fork Bot
    • Manage Bot
    • Alarm Notification Template
      • Message Template Variable Summary
    • Condition(s) Description
    • Webhooks
    • ⛏️Supported Data Sources
    • API
      • API Key Application
      • API Doc
  • Bot Configuration Examples
    • Event Bot Example
    • Dex Bot Example
    • Value Bot Example
    • Transaction Bot Example
    • Block Bot Example
    • NFT Bot Example
    • Snapshot Bot Example
    • Arweave Bot Example
  • 🫂Privacy Policy
    • Privacy Policy
    • Terms of Services
  • Support
    • 🤔FAQ
    • 📩Contact us
Powered by GitBook
On this page
  • What is an Alert Notification Template?
  • Advanced Features of Alert Notification Templates
  1. Advanced Features

Alarm Notification Template

PreviousManage BotNextMessage Template Variable Summary

Last updated 8 months ago

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 "{}".

Advanced Features of Alert Notification Templates

To use these features, users need basic programming skills.

1. Formatting Time

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

2. Arithmetic Operations

"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}
💻
Learn about the different injected variables supported by Bot monitoring