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 2 types of reports: Daily and Weekly.
-
Daily Report is generated on weekdays (except Monday) and shows those users who did not fill in their time for that day.
-
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 # 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.
-
Add job in Heroku Scheduler
bin/rake reports:daily
for daily 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:fs/harvest-notifier.git
cd harvest-notifier
- Setup project
bin/setup
- Check specs and run quality tools
bin/build
It was written by Flatstack with the help of our contributors.