Name: harvest-forecast-slack-checkin
Owner: Human Made
Description: Harvest Forecast - Slack integration for daily team member checkin status
Forked from: stpe/harvest-forecast-slack-checkin
Created: 2016-07-01 09:59:29.0
Updated: 2016-07-01 10:06:21.0
Pushed: 2016-03-21 10:21:30.0
Size: 178
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a Slack integration that does post a summary of what each person is planning to do the current day according to Harvest Forecast.
Example output:
At Rebel & Bird we use Forecast to schedule the team across different projects with different clients. The idea of this Slack integration originated after noticing a few things, that it also tries to address…
This is just a first hack, and there are more potentially useful enhancements that could be made.
With a greater number of people it may not be feasible to just post a huge list; support for posting in different channels depending on team, location, etc is a possible solution.
Feel free to submit pull requests or suggest enhancements.
Checkout the harvest-forecast-slack-checkin repository. If you're new to GitHub, check out GitHub Desktop.
Make sure you have installed the latest stable version of Node.js.
In the checked out repository, install run:
npm install
Put configuration in a file named .env
.
Example:
CAST_ACCOUNT_ID=123456
CAST_AUTH_TOKEN=Bearer 22789.ToKeN...
LE_EXCLUDE_FILTER=45678,12345,98765
ECT_ID_TIME_OFF=234567
NT_ID_INTERNAL=23456
CAST_TEAM_URL=https://forecastapp.com/123456/schedule/team
_IF_WEEKEND=yup
K_WEBHOOK=https://hooks.slack.com/services/...
K_CHANNEL=checkin
K_ICON_URL=https://forecastapp.com/assets/images/apple-touch-icon.png
K_USERNAME=Forecast
FORECAST_ACCOUNT_ID
- Your Forecast Account ID
FORECAST_AUTH_TOKEN
- Your Forecast Authentication Token
As of now there is no super convenient way to get your account ID and authorization token.
Open up your browser of choice.
Open Developer Tools.
Select the Network tab, and then XHR.
Open a page on Forecast while logged in.
In the list of requests, click the one of the GET requests to see Headers.
Scroll down to Request Headers.
Find authorization, the long string starting with Bearer is the FORECAST_AUTH_TOKEN
.
Find forecast-account-id, the value is your FORECAST_ACCOUNT_ID
.
PEOPLE_EXCLUDE_FILTER
- Comma separated list of people IDs to exclude
PROJECT_ID_TIME_OFF
- Project ID of what is time off
CLIENT_ID_INTERNAL
- Client ID to determine what is internal work
FORECAST_TEAM_URL
- Team URL used as link in Slack message
SKIP_IF_WEEKEND
- Set to something to not run on weekend (otherwise remove line)
SLACK_WEBHOOK
- Webhook URL as stated on Incoming Webhook integration page
SLACK_CHANNEL
- Slack channel to post message in (without #
)
SLACK_ICON_URL
- URL to Slack message icon
SLACK_USERNAME
- Slack username to use when posting message
Perform tests by running:
npm test
npm start
To deploy to Heroku you need to have an account and have the Heroku Toolbelt installed.
Create an Heroku application:
heroku create your-appname-of-choice
Push your local configuration to Heroku:
heroku config:push
Deploy the code to Heroku:
git push heroku master
Verify that it does run:
heroku run worker
Set up the Heroku Scheduler addon:
heroku addons:create scheduler:standard
Configure the scheduler:
heroku addons:open scheduler
Add a new job where the command is simply worker
scheduled daily to the time you want the message posted in Slack.