Skip to content

Instantly share code, notes, and snippets.

@MGallow MGallow/Slack.py
Created Oct 14, 2016

Embed
What would you like to do?
Let Slack notify you when your script is finished running!
# This is a simple script that will allow Slack to notify you when your script is finished running.
# Specifically, you will receive a message that says: "Script Complete".
# But first, you need to generate a Slack token.
# See here: https://api.slack.com/tokens
from slacker import Slacker
Token = "PLACE TOKEN HERE"
slack = Slacker(Token)
# Send a message to #CHANNEL.
# Adjust CHANNEL and USERNAME to suit your needs.
# Be sure that this line is placed at the end of your script.
message = slack.chat.post_message('#CHANNEL',"@USERNAME Script Complete", as_user = False)
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.