Tracking tasks with Whatsapp

I’ve talked previously about about digital simplicity and efficiency in a previous post. The more efficient I can be on my devices the less screen time I consume and more present time I can give myself and those around me. One of the best ways I’ve found to be efficient on my devices is to limit the number of applications I use on a regular basis (one of the reasons engineers like to stay inside the terminal as much as possible).

A recently wrote a small application that uses Whatsapp to keep me accountable to to recurring tasks each day. I call it Drill Sergeant and I've recently open-sourced here. It’s incredibly basic (<200 lines of code) but its been very successful in keeping me accountable each day.

There are daily recurring tasks that I want to check off everyday (todo lists are the secret to everything). For me they’re super benign such as stretch for 15m, workout for 30m, etc. However, having a daily list to hold me accountable and get that green check at the end of the day is extremely rewarding. I didn’t want to introduce another app in my life so I wanted to integrate it into something I’m using constantly anyways.

I picked Whatsapp. I’m already using Whatsapp each day to talk with my wife, family, friends and colleagues. I'm a Android loyalist, but most of my close friends and family are on iPhones. Its one of the best cross-platform messaging applications, everyone has it, and its great on both mobile and desktop. Unfortunantly, Whatsapp isn’t great on the developer side and not built for bots. However, Twilio does offer a decent option by making a developer account on Twilio and running it yourself.

It uses Typescript to interact and listen to events from a Whatsapp Twilio developer account number (you have to be a verified business to distribute it for public consumption). It's backed by redis to keep track of the users and their history. It has five basic commands.

  • add - ie: add [30m] stretch
  • remove - ie: remove [30m] stretch
  • complete - ie: complete [30m] stretch
  • list - will list out the daily tasks for today and what you've completed
  • history - will display a rough calendar of the past 30 days and when you've accomplished all of your goals.

It tries its best to match inputs to commands. You can use shorthand and only use the first couple letters. ie co stre will match complete [30m] stretch. The only exception is remove, which needs to be exact. A new day starts at midnight PST and a reminder message is sent at 8am PST.

In order to run this yourself you'll need to setup a (free) Twilio developer account. If I have more free-time someday I'll try to register it as a business and make it publicly available, but that's for a different day. However, if you’re up for the challenge you can check it out on Github here!

Drill Sergeant Screenshot