Using IFTTT to Track Habits

Leveraging IoT and Data Science for self-improvement

Photo by Prophsee Journals on Unsplash

The holidays are near, and for most of us, it is a time of reflection (and melancholy). In my case, the year-end reflection brought me to 3 realizations about myself this year:

  1. Haven’t exercised as much as I want to (only went out to bike 15 minutes maximum, 2 times a week)
  2. Haven’t meditated and written in a journal as much as I want to (I hate to admit this but I’ve spent way too much time in the morning checking LinkedIn and emails, so this team coco vid resonates with me on a spiritual level)
  3. Haven’t spent time on personal Learning & Development as much as I want to (my #100DaysOfCode streak got broken and I have worked on online courses instead in short bursts)

Atomic Habits by James Clear inspired me to take action in these areas by building systems (instead of goals) and designing my environment to keep a habit (cue →craving → response → reward).

Today is my 3-day streak on exercise, journal-writing and meditation. Here’s how I applied atomic habits to exercise and meditation:

  1. Wake up → take a half bath shower → brush → hang towel to dry → wear night gown → meditate (the cue is wearing the night gown)
  2. After meditating, take of night gown and change clothes → write at least 2 sentences on journal (the cue is changing clothes)
  3. Around 11:30am when I could sense that lunch is almost ready, I would put on my socks and sneakers → play the home workout vid (30 minutes) → exercise (the cue is wearing sneakers)

So far, I have successfully meditated for at least 30 seconds, written 2 sentences on the notebook (usually about the things I am grateful for and how I want to be better today) and followed 5 minutes out of the 30-minute home workout routine — for 3 days straight. Before I started exercising, I couldn’t breathe 1 minute into the video, so I feel pretty good reaching the 5 minute mark.

For all these three aspects, the effect is physical and immediate so it’s quite easy to track. I’m able to track meditation and journaling by looking at the pages of my notebook. I’m able to track my progress in terms of cardio / physical strength by pausing the workout video when I can’t breathe anymore and look at the timestamp, e.g. how far into the workout video until I got tired. As mentioned, I’m currently at 5 minutes out of 30.

For Learning and Development, I am in the process of creating a system and my initial idea is to track my work hours and hours spent on R&D using IFTTT. Last month, I was able to avail IFTTT Pro which I was planning to use for system reliability alerts in our IoT projects.

IFTTT for healthy habits:

Tonight, I stumbled upon the Button widget — Google Sheets applet. I connected it to my account and started testing it.

Track number of work hours with a button press

This is what the widget looks like on my home screen:

Pressing on the sheet icon triggers the creation of a row

Here’s the resulting sheet and the output rows after I pressed the Sheet button 4 times in a row:

Column A is the date and time that the button widget was pressed, Column B is the label of whether the button press was a start / stop and Column C is the calculated number of hours in decimal (example, in row 4, work hour stopped after 4 minutes → 4 minutes * (1 hour / 60 minutes) → 0.07 hour).

I think this system will definitely make my L&D habit easier to track and will help me determine how best to improve. But it still needs some modification to track L&D hours instead of “work” hours. This is my next goal → creating an IFTTT applet that tracks L&D hours. Stay tuned for details on how I implemented this and the results of my atomic habit experiments! | Product | Data | IoT | Automation | Decision Science