Skipper Snacks
Share
Explore

A script to colour-code your calendar events

Automate colour coding your work calendar to see how you spend your time

Inspiration

Why would you want to do this?

Colour coding allows you to quickly see where your time is spent during the week so you can check if you focus on the right things. ~

It started with Pavel, my manager, doing this for himself. I realized quickly that there was no easy way except to manually assign colours for every event, and sadly it didn’t even seem to work for recurring events. Most resources online were about creating new personal calendars for different categories – but you can’t do that for your work calendar. It would also need manual re-assignment of every event to the correct calendar.

I really liked the idea of classifying my events using colours associated with
, as mentioned
and
. I found a 2-part guide to using Google Apps Script to achieve this:
,
. I modified the script heavily to suit my needs.

The script

Triggers

Instead of using the webhooks with IFTTT as described in my inspirational sources, I used Apps Script’s own Triggers feature, as shown here:

image.png

Finally

It works! You can see the result in the screenshot header. The links in the inspiration will be useful if you want to do this for yourself. I’ll not bother repeating what they say, they do a pretty good job.

Alternatives

After I published this,
pointed out that this is possible to do in
. I’m a fan of Coda for things like this. This alternative could be what you prefer to use. I haven’t tried it but the cool thing is it also gives you
on how you’re spending your time. The current version requires you to manually assign events to categories, but I’m sure it can be adapted to use rules or conditions instead.

Cheers!

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.