✓ Powerful Automations — Part ❷— Automated Smart Calendar For Teams

between (JIRA, Github, Slack, G-Calendar) and how it effects you development process

Alex Pinhasov
4 min readApr 22, 2021

2. 💬👤 Slack & Google Calendar For Teams

Working in an agile team means the development process is flexible with short but meaningful sprints, so the best thing you can and should do is to know what is your team work capacity without wasting time asking or worse manually scanning calendars.

What I needed is one place or a platform to gather all the team constraints, one that can send you notifications for any change, one that all of us use everyday most of the day and most importantly automated!
And I found it.

When combining Google calendar for teams with Slack web-hook you get a powerful combination of:
✏︎ Who is Out Of Office (OOO, or any other string combination).
✏︎ What holidays are today/this week (if you work with global teams).
✏︎ Team Daily schedule.
✏︎ Team Weekly schedule.
✏︎ Get notifications for event changes (Team related).

All of this helpful information is sent to your channel of choice using triggers. This Information is useful for each team member as well as you as a manager/team leader planing your week or next sprint, and its all automated. 🤯

Today’s Schedule example

Lets get technical, to solve the “gather all the team constraints” task the first thing I had to do is to create a new calendar, from now on every team related meeting will add this calendar as a “guest” so
- Team related meetings ✅.

Next I found and imported gmail calendars for every country my team is from, giving my main calendar a source of holidays. Using a script I copied all the holidays from those calendars into my new team calendar
- Holidays in my calendar ✅.

And last thing is personal constraints such as vacation or general OOO events. using another script I copied all of those constraints with predefined template such us [“OOO”, “Vacation”,”Out Of Office”] and others to filter events.
- Team personal constraints ✅.

And this is what I have achieved, we can see holidays, OOO events and our team meetings.

Once the calendar part is done, next step is to output this information to a platform, and the one I choose is Slack, we all use it its very popular and works great. After installing the “Google Calendar For Teams” add-on I managed to connect the calendar to a dedicated squad channel thus completing my goal.

What did I do? And how can you do it

1.
Create a calendar 📆

https://support.google.com/calendar/answer/37095?hl=en

2.
Add a script that runs once every day using an automated trigger event, which scans the team members calendar looking for “OOO” events and copies them to the squads shared calendar. The script searches for keywords such as “OOO” you can change that to whatever you convention is.

- The script

https://gist.github.com/AlexPinhasov/ccddf77ecc639e3852ecf254e538d57e

- Where to place it

https://script.google.com/home (New project)

- Open the script and follow the instruction on the first 10 lines.

- To add the daily trigger click at “My Triggers” (home) and set the following parameters (you must run the script at least for this step to work)

3.
Add a holiday calendar for each member country, then use a script to copy all the holidays from that calendar to the shared one

- Where to get holiday calendar for countries (Download and import into your organization calendar)

https://www.calendarlabs.com/ical-calendar/

- The script

https://gist.github.com/AlexPinhasov/605eef6f3ac7cc9201d48b1bdfbce685

- Where to place it

https://script.google.com/home (New project)

- Copy the ID’s of the new holiday calendars and place them in script

Final look of the “Apps Script” after step 1 and 2

4.
To see the squads meetings make sure to invite this new calendar to the meetings you create, you can also auto-accept meeting as a calendar.

5.
Add “Google Calendar For Teams” to your slack

Google Calendar for Team Events
Once connected, you will see this screen, click “Connect a Calendar…”

Inside choose the shared calendar we have created in step 1, and if you have a group channel select it. A new set of options will present itself, choose when you want to send this information in the channel.

Since the calendar is a guest in the meetings every change to the event will be reflected in the slack channel as well! 😎

✅ Thats it!

If every thing is connected successfully you should start seeing this event information in you slack channel.

--

--