You can also send messages over the HTTP based API. That can be used to let external services post messages to your channels or to a specific person.

Here an example for a script:

#!/bin/bash
Receiver=$1
Message=$2
curl -X POST -F "receiver=$Receiver" -F "msg=$Message" -F "apikey=YourSecretKey" https://your-domain/modules/addons/slackforwhmcs/API.php --silent


Then you can send messages using this command:

./send_slack "#channel@$(hostname)" "My CPU temperatur is too high. Can you please check me urgently?"
  • No labels