Summary
The purpose of this exercise is to update cards in the Placker project management tool with actual time spent on the activity based on time logged using Toggl.
Update: after writing this and running with it for a while, the issues noted at the end were too much for me. Not only did it not work well enough, but I also ran out of my free allowance of “Zaps” from Zapier halfway through the month for which I was already paying $15 odd.
I get why it’s a good tool for marketing or less technical folk, but given that with the Zapier approach I feel like I had to write half of the code anyway, I didn’t really feel like paying them for the privilege.
So, since then, I wrote a little script in Node that is now running on Google Cloud Functions which is available on GitHub, and I haven’t had to pay Google a single penny for the privalage of running it for me.
Approach
- Use the Toggl browser extension to start a Toggl timer to ensure the description matches the card title
- Use Zapier to fetch recently completed time entries from Toggle
- Fetch the related card from the Placker API
- Add the time spent in the Toggl entry to the current actual time spent on the card
- Update the Placker card with the new actual time spent value
Description
Start the Toggl timer using the browser extension in Placker
Create a step to process new time entries
Attempt to fetch a placker card with a title that matches the Toggl description
Only continue if a card was found
Use JavaScript to calculate the new actual time
Update the Placker card with the new actual time
Issues with this approach
- Card names must be unique or it is possible that the wrong card may be updated
- If two time entries are processed in the same run by Zapier, it processes them at the same time and so one entry will overwrite the updated actual time made by the other entry