Command line 簡單發送訊息至 slack

有些 command line 排程任務在完成、失敗時,需要發送訊息到 slack
可以利用 curl + slack web hook 指令快速完成

curl -X POST -H 'Content-type: application/json' --data '{"text":"Allow me to reintroduce myself!"}' https://hooks.slack.com/services/Txxxx5/B0xxxxxxxFV3/BlxxxxxxxxxxxxEh

ref. Sending your first Slack message using Webhook | Slack

1個讚