Skip to content

Instantly share code, notes, and snippets.

@osapon osapon/put_slack.sh
Created Jun 5, 2016

Embed
What would you like to do?
put_slack() {
channel_id=`curl -s "https://slack.com/api/im.open" --data "token=${slack_team_key}" --data "user=${slack_user_id}" --data "pretty=1" | jq -r ".channel.id"`
curl -s 'https://slack.com/api/chat.postMessage' \
--data "token=${slack_team_key}" \
--data "channel=${channel_id}" \
--data "pretty=1" \
--data-urlencode "text=$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.