Time tracking doesn’t have to be complex. If you’re not creating elaborate invoices but just want an overview of your time budget, there are fairly simple methods.
Some time ago I introduced my tool “TimeSheets”, which lets you track and evaluate your time directly in your calendar using hashtags. By now the Google Sheets add-on is used by over 60,000 users every week. The biggest criticism was that you have to update the Google Sheet manually again and again. So I came up with something smarter:
Using the hashtags directly in the calendar!
How does it work?
With Google Apps Script, Google offers an easy way to provide smaller scripts and run them directly in other users’ accounts. This makes it easy to connect various online services with each other.
In addition, there are so-called “triggers”. They let you tie the execution of a script to an event. In my case, the code is executed whenever a calendar entry is created, edited or deleted.
Whenever there is a change, the respective day is re-evaluated, i.e. all calendar entries of the day are evaluated for hashtags and the time used is recorded. In addition, an entry for the whole week is created that shows the weekly working time.

Time tracking happens a few seconds after a new entry is created. Unfortunately, the execution can’t be coordinated. So it can happen that the script doesn’t update cleanly if you make a lot of changes at the same time. That’s because the script is then executed several times with different saved states of the calendar, and an older state of the time tracking may end up in the calendar. In the
If something looks odd, simply create another appointment on the same day to trigger another calculation.

At the end of the week there is an additional entry with the weekly working time. In addition, the description contains a summary of the individual projects.
So much for this little hack. If you want to see it in action, you can install the script.