Request standup reports from team members and send a daily email digest of all standup reports.
Overview:
- At 10:00 am slackbot requests standup reports containing the following information:
- what you worked on yesterday
- what you’re planning to working on today
- a list of any blockers you have.
- At 11:30 am it will send a reminder to team members who haven't responded yet.
- At Noon it sends an email digest with all the standup reports to an email list.
Timing is configurable based on how one chooses to set up the cron job (see the architecture section below)
- clone this code base to a server or virtual server (I used an AWS EC2 running ubuntu)
- create gmail account or other mail server
- Get a token for your Slack API
- Rename
config_EDIT_ME.pytoconfig.pyand:- add your slack token
- add your mail server credentials
- add emails to receive the digest
- add slack member IDs for dynamic reminders
- set up a cron job to run
run_standup.shat the time you want.- The EC2 server is on UTC time, so the times in the crontab need to be converted accordingly.
- Timing can be customized further by editing the duration that
standup.pysleeps at after each stage.
- Create a virtual environment with the requirements specified in
requirements.txt
- Ensure the path to
run_standup.shis correct in the crontab file.- Needs to be the path from the directory in which the cron job is run.
- The
run_standup.shscript is run at the time specified by the cron job- Edit the crontab file via crontab -e
- The ec2 server is on UTC time, so the times in the crontab need to be converted accordingly.
- On start up,
standup.pysends a message to the standup slack channel- Slack messages can be uniquely identified by timestamp (ts), so we store the timestamp to identity responses to the original message. We write the time stamp to a file so that
listener.pycan read it and only record messages that are in response to a message with that timestamp. - After sending the message, and persisting the timestamp, this script sleeps for 90 minutes.
- Slack messages can be uniquely identified by timestamp (ts), so we store the timestamp to identity responses to the original message. We write the time stamp to a file so that
listener.pyis a listening server that waits for message events in the slack API and persists them in msg_lst (a pickle file) if they are responses to the standup message (using the timestamp)- After 90 minutes of sleeping, the
standup.pyscript sends a message to the people who haven’t responded. Then it sleeps for another 30 minutes. - Finally, the
standup.pyscript reads all the messages persisted in mgs_lst and emails people according toconfig.py.config.pyalso stores the slack API key.
