Skip to content

Instantly share code, notes, and snippets.

@csawall
Last active October 22, 2016 02:55
Show Gist options
  • Save csawall/c5e0f113cddbf6c38d562c5c0e1a9bd9 to your computer and use it in GitHub Desktop.
Save csawall/c5e0f113cddbf6c38d562c5c0e1a9bd9 to your computer and use it in GitHub Desktop.
Simple Slack Webhook to Post
#!/usr/bin/env bash
SlackURL_key="https://hooks.slack.com/services/KEYDATA01/KEYDATA02/KEYDATA03"
Slackjson="{\"text\":\"This is a test\nIf you see this, it worked!\"}"
curl --silent --request POST --header "Content-Type: application/json" --data "${Slackjson}" ${SlackURL_key}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment