Slack Reminder is an integration between Harvest and Slack which automatically reminds users who forget to mark their working hours in Harvest.
This is a Ruby 2.6.5 library for installation on Daily Heroku Scheduler. Notification is determined from Harvest API V2.
There are 3 types of reports: Daily, Monday, and Weekly.
-
Daily Report is generated on weekdays (except Monday) and shows those users who did not fill in their time for that day.
-
Monday Report is generated on Mondays and shows info about the past Friday.
-
Weekly Report is generated every Monday and shows those users who still need to report the required working hours for last week.
This integration allows to:
- mention users in the Slack
- refresh report result
- quickly report the working hours from the link
- set up custom report schedule
- configure a whitelist which consists of users, who don't need to be notified in Slack
- Prepare access tokens
-
Create Personal Access Tokens on Harvest.
-
Create Bot User OAuth Access Token
-
Add following scopes to Bot:
chat:write users:read users:read.email
-
Add app to Slack channel.
-
Configure following ENV variables
heroku config:set HARVEST_TOKEN=harvest-token heroku config:set HARVEST_ACCOUNT_ID=harvest-account-id heroku config:set SLACK_TOKEN=slack-bot-token heroku config:set SLACK_CHANNEL=slack-channel heroku config:set EMAILS_WHITELIST=user1@example.com, user2@example.com, user3@example.com # EMAILS_WHITELIST is a variable that lists emails separated by commas, which don't need to be notified in Slack. # For example, administrators or managers. heroku config:set MISSING_HOURS_THRESHOLD=1.0 heroku config:set MISSING_HOURS_DAILY_THRESHOLD=1.0 # MISSING_HOURS_THRESHOLD is a variable that indicates the minimum threshold of hours at which the employee will not be notified in Slack. # For example, 2.5 or 4. The default threshold is 1 hour. Leave empty if satisfied with the default value. heroku config:set TZ=America/New_York
-
Add job in Heroku Scheduler
bin/rake reports:daily
for daily reportbin/rake reports:monday
for monday reportbin/rake reports:weekly
for weekly report
If you have any questions or suggestions, send an issue, we will try to help you
bin/quality
based on RuboCop.rubocop.yml
describes active checks
- Сlone repo
git clone git@github.com:carwin/harvest-notifier.git
cd harvest-notifier
- Setup project
bin/setup
- Check specs and run quality tools
bin/build
This project is a fork from the original Flatstack project with borrowed code from Be Intelligent Ltd's Monday report modifications.
It was written by Flatstack with the help of our contributors.