Created
March 5, 2015 19:10
-
-
Save nullfieldio/e5e7a1ba7fa20b89fd1c to your computer and use it in GitHub Desktop.
slack bash webhook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
URL= #https://hooks.slack.com/services/<YOUR ID> from webhooks on https://myteam.slack.com/services | |
CHANNEL="#general" # name of channel | |
MESSAGE="Hello World" # message | |
NICK="troll" # bot name | |
# post message | |
curl -X POST \ | |
--data "payload={\"channel\": \"${CHANNEL}\", \"username\": \"${NICK}\", \"text\": \"${MESSAGE}\", \"icon_emoji\": \":troll:\"}" ${URL} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment