slack

https://api.slack.com/methods/channels.list/test

slack bot post

########################################################################

#slack post method via chat.postMessage api

#@kevin token from https://api.slack.com/web

slack_token="xoxp-wwwwwwwww-xxxxxxxxxx-yyyyyyyyyyyy-zzzzzzzzz"

channel_id="G0LAW6GQR" #blah

#channel_id="C02UYL95L" #devnul

bot_name="Bat-Bot"

bot_emoji=":bat-signal:"

########################################################################

message="Starting process on the following list of servers http://blah.com/$(basename $tmpserverlist)"

curl --data-urlencode "text=$message" -X POST "https://slack.com/api/chat.postMessage?token=$slack_token&channel=$channel_id&username=$bot_name&icon_emoji=$bot_emoji&pretty=1"

message="Finished process on the following list of servers http://blah.com/$(basename $tmpfilepath)"

curl --data-urlencode "text=$message" -X POST "https://slack.com/api/chat.postMessage?token=$slack_token&channel=$channel_id&username=$bot_name&icon_emoji=$bot_emoji&pretty=1"