Periodically posts reminders in your Slack chat to remind users of events from your Google Calendar. Reminders can be scheduled daily, weekly, and/or monthly.
- Follow steps 1 and 2 of the Google Calendar API Python Quickstart. Move the
client_secret.json
to the same folder asslack_scheduler.py
- Install required libraries
pip install pytz pip install slackclient pip install schedule
- Generate a token for your Slack team
- Find the Slack channel ID for the channel you would like to post reminders in
https://YOUR SLACK TEAM URL.slack.com/api/channels.list?token=SLACK TEAM TOKEN
There are three required command line arguments:
- The Google Calendar you would like the reminders set for (primary, work, etc.)
- The token of your Slack team
- The Slack channel ID you would like the reminders to be posted into
###Flags
-d - set a daily reminder in the Slack channel
-w - set a weekly reminder in the Slack channel
-m - set a monthly reminder in the Slack channel
-r - set a time for the reminder in military time (if no reminder is set, reminder time defaults to 0:00)
-dt - display the events happening today in the terminal
-dw - display the events happening this week in the terminal
-dm - display the events happening this month in the terminal
Daily, weekly, and monthly reminders to the selected Slack channel will fire at 13:00
$ python slack-scheduler.py [<calendar>][<token>][<channelID>] -d -w -m -r 13:00
Daily reminders will fire at midnight
$ python slack-scheduler.py [<calendar>][<token>][<channelID>] -d
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
- Detect users time zone (Unfortunately, it only works for eastern time zone currently)