Skip to content

Instantly share code, notes, and snippets.

@LightAxe
LightAxe / slack.sh
Last active October 10, 2017 23:01 — forked from madcoda/slack.sh
Slack Webhook bash script
#!/bin/bash
CHANNEL="#general"
USERNAME="MyBot"
EMOJI=":ghost:"
MSG=$*
PAYLOAD="payload={\"channel\": \"$CHANNEL\", \"username\": \"$USERNAME\", \"text\": \"$MSG\", \"link_names\": 1, \"icon_emoji\": \"$EMOJI\"}"
HOOK=https://hooks.slack.com/services/T00000000/XXXXYYYZ/XXXXXXXX