For this weeks assignment I tried to implement an intervention that would motivate user data input. I began to think about the workflow I currently use for my other productivity apps and how I motivate myself to use them. One of the main productivity apps that I use is called Toggl. Toggl is a time tracking app. In order to start and stop of Toggl timer I have implemented a Siri Shortcut. This shortcut asks me questions about the project o am working on as the task and then sends that data to the toggle API and starts an appropriate timer. I realized that I could improve this shortcut by adding a series of my own questions and send that data to my own express api and then i could start my toggle timer. This shortcut could be added to my home screen so every time I want to run a timer I have to first go through this shortcut.
Here is how I set up this workflow....
First I created a list of questions that I wanted to ask in my Siri shortcut (Figure 1). Each question has a variable name that was eventually referenced in the api key.
Next I created an express API that could receive all the necessary variables and implemented an authorization. Using Mongoose and Heroku I made this API live. For now I was just focused on the backend so the homepage does not show any information. Only the /api route contains information.
Next I developed four new Siri Shortcuts (two for starting a work session and two for ending a work session). The shortcut shown in Figure 2 is the “start ask” shortcut.
Since I use toggle for more than just tracking my work I want to be able to run a toggle timer without being asked all of the work session questions. This shortcut acts as a guard for starting my work session. If I say yes I am starting a work session, the “start work session” shortcut will run. If I say I am not starting a work session, my “Toggl on” shortcut will run. Figure 3 shows the “start work session.”
This shortcut asks a series of questions about the beginning of my work session and also records my location and the current weather. The answers to each question are posted to the express API online. At the end of this shortcut, the “Toggl on” shortcut is run to also begin a toggle timer for the work session. Figure 4 shows the end work session shortcuts.
These shortcuts work the same way as the start work session shortcuts but instead call the “Toggl off” shortcut to turn off the running timer. The questions asked in the “Stop Work Session” shortcut are also sent to my express API.
The resulting data will eventually be used to build a front end visualization of work session data. This setup can easily be repeated for any tracking implementation. Using siri shortcuts easily allows the user to talk to the API on their device without having to open a URL in a browser.