Daily goals have got to be one of the most powerful ways to consistently achieve meaningful change and improvement upon yourself. For some people, all they need is a notebook and maybe some colourful sharpies and they are happy to track their progress every day. I’m more of a no extra effort required type of guy, thankfully Toggl allows me to do just that.
A while ago I wrote a brief guide to Sync Fitbit workouts to Toggl and this is very much in the same vein. Since I track all my personal productive time and my daily goals usually tend to fall within one of those already time tracked Toggl projects I had an idea. What if I set up yet another webtask.io function to go do some magic for me. Data meet result. I won’t need to force myself to manually go tick a box in some notebook after all.
Now for a fair waring. The idea here is to have the webtask call the Toggl API daily and based on tracked timers set a flag on another API which I have that runs my browser “startpage” aka personal dashboard. The startpage API is closed source (for now), but I’m sure if you are even remotely interested in doing something similar you will be able to figure out some other service to point this webtask to. Perhaps something like getting the webtask to send you an email or call your mom with a prerecorded voice message telling her you don’t care for goals.
Now for the good stuff.
Track daily achievements with Toggl
All you need to get going is:
- Some time.
- An idea for what to do if you achieve or fail a daily goal.
- Your Toggl API key and project ID.
- A webtask.io account.
- My shiny code on Github.
Go ahead to webtask.io/make and paste the code into a new webtask function.
First, we need to add the following secrets from Toggl (your Toggl API key and the ID of the project you want to use to measure your daily goal against).
Then we need to make sure to add the following NPM Modules for the function to work right.
firstname.lastname@example.org email@example.com firstname.lastname@example.org
You could probably use different versions if you really wanted to.
Time for some sparks, give it a try by pressing the play button for the Runner and then the Run button. It might be a good idea to check the console for errors as you start changing the “sample goal tracking server request” to do something specific to your use case. Tweet me with what you made it do on @jacob_pretorius as I would love to see what you come up with.
With that all done it’s probably a good idea to have the webtask run on a schedule, I prefer having mine run at four am each morning as I like to give myself until at least midnight to reach the goal and I won’t need the data any earlier than four (and that also gives some general time zone mismatch weirdness buffer). Remember it only looks at tracked timers for the previous day.
If you found this somewhat useful Github stars are appreciated.
Thanks for stopping by.