This project allows you to analyze your slack channel and export basic stats to the spreadsheet.
It calculates:
- number of issues
- number of resolved issues (issues with at least one reply)
- average number of replies in thread
- total time spent in the thread
- FTE
-
Fork the repository.
-
Set up the following data in Github secrets:
SLACK_BOT_TOKEN: Token of the bot that is added to the Slack channel and can read messages.GOOGLE_CERT: JSON certificate file with service account email and private key that supports the Spreadsheets API.
-
Modify
config.tsfile by adding
- spreadsheetId (ID that can be found in the URL (
spreadsheets/d/{GOOGLE_SPREADSHEET_ID}/edit#gid=0)) - channels map:
- key - identifier that you can use to run workflow locally. It's also used as a
sheetTitle. - value - channelId found on slack.
- key - identifier that you can use to run workflow locally. It's also used as a
- Create spreadsheet with comulns for the following data:
- date,
- numOfIssues,
- numOfResolvedIssues,
- averageNumberOfRepliesPerThread,
- totalTimeSpentHours,
- fte
- Run the Slack Channel Report action or wait for cron to run it (3AM on the first day of the month).
- create
.envfile:
SLACK_BOT_TOKEN="XXXX"
GOOGLE_CERT={ ... }
-
Run
npm run build -
Run:
node dist/src/fetch.jsto fetch data for given date and saave to file inoutput/directory. Modify script if you want to change dates or output file name.node dist/src/analyze.jsto analyze local files. Modify script if you want to analyze different files.