Search…
Actions
What to do when you have a match
Once a trigger is triggered, HAL supports several different kinds of actions that can be invoked:
    Webhook, which calls a non-authenticated webhook passing the decoded data for the current context (info about the match) via POST
    Email, which sends an email using a template system that allows you to use all the current context variables in the body or subject
    Slack, which allows you to post messages on Slack using either the official HAL Slack App, or by providing a custom web hook if you want to use your own Slack integration (more info here).
    Telegram, which allows you to have your own Telegram bot to post messages on private chats and public channels (more info about Telegram bots here).
    Twitter, which allows you to let HAL tweet on your behalf (or on behalf of your twitter bot)
    Discord, which allows you to post on any channel on your Discord server (or any channel you have the token for)

Webhook actions

The syntax is super easy:
1
{
2
"type": "Webhook",
3
"attributes": {
4
"uri": "https//www.foo.bar"
5
}
6
}
Copied!

Email actions

The object structure is:
1
{
2
"type": "Email",
3
"attributes": {
4
"body": "This tx has a Value higher than 10: it's $Value$ !",
5
"subject": "Alert related to tx $TransactionHashquot;,
6
"to": [
8
"!my_variable",
9
"!my_array_of_addresses[4]"
10
]
11
}
12
}
Copied!

Slack actions

1
{
2
"type": "Slack",
3
"attributes": {
4
"uri": "https://hooks.slack.com/services/xxx/yyy/zzz",
5
"body": "Lorem ipsum..."
6
}
7
}
Copied!
You can use the official HAL Slack App, or you can provide a custom web hook. More info here.

Telegram actions

1
{
2
type: Telegram,
3
attributes: {
4
body: "Lorem ipsum...",
5
chatid: "@mychannel",
6
format: "HTML",
7
token: "secret"
8
}
9
}
Copied!

Twitter actions

1
{
2
type: Twitter,
3
attributes: {
4
status: "hello tweet",
5
token: "my token",
6
secret: "my secret"
7
}
8
}
Copied!

Discord Actions

1
{
2
type: Discord,
3
attributes: {
4
body: "body",
5
discordURI: "discord URI"
6
}
7
}
Copied!
Last modified 1yr ago