Skip to content

Instantly share code, notes, and snippets.

@sirkirby
Created September 22, 2015 19:37
Show Gist options
  • Save sirkirby/f747f6184a6dace22705 to your computer and use it in GitHub Desktop.
Save sirkirby/f747f6184a6dace22705 to your computer and use it in GitHub Desktop.
Send a slack notification from a windows command prompt using curl
curl -k -g -X POST -d "payload={\"text\":\"my important bot notification\", \"channel\":\"#monitoring\", \"username\":\"computer-bot\", \"icon_emoji\":\":computer:\"}" https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XxXxXxXxXXXxxXXXxxx
@MrLMrks
Copy link

MrLMrks commented Jul 23, 2021

Hey, I'm a little bit late to this, but is it possible to add green/red color to the message? I managed to find that it's usually done via "attachments:"[
} "color:"#colorcode",

But how I pass it to this curl command?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment