Weekly
Flag meetings on public holidays and post the on-call rota in Slack
Every Monday your team sees next week's meetings that clash with public holidays or leave, and who is on call this week, in one Slack post.
- Runs
- Weekly
- Apps
- Google Calendar, Slack
- AI
- Not needed
- Access
- Calendar read(+write); Slack chat:write
Send this to your assistant
Create a ClickRuntime automation: every Monday, check next week's team calendar against public holidays and leave, and post any conflicts and this week's on-call person in #team.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A support team spread across the UK and Germany schedules its weekly reviews on a shared calendar. Twice a year someone books a session on a bank holiday in one country, and the on-call rota is a spreadsheet nobody checks until the pager goes off.
A Monday post that flags holiday clashes ahead of time and names who is on call this week saves wasted meetings and confusion about who is answering alerts.
What you get out of it
Holiday clashes are caught early
Meetings that land on a public holiday are flagged a week ahead, with time to move them.
On-call is never in doubt
Everyone sees who is on call this week in the team channel, not in a sheet that has to be looked up.
Rotation skips people on leave
Anyone with leave on the calendar that week is passed over, so the rota does not land on someone who is away.
Fair turns over time
The rotation goes through the team in order, so nobody ends up on call more often than everyone else.
How it works
What happens, step by step
Every Monday morning ClickRuntime reads next week's events from your team calendar.
It fetches the public holidays for the countries you chose and finds any meetings that fall on one.
It picks the next person in the on-call rota, skipping anyone with leave on the calendar that week.
It posts the holiday conflicts and this week's on-call person in your Slack channel.
Before it runs live
- Connect Google Calendar
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Google Sheets
- Combine it with other Google Calendar and Slack steps into one automation
Under the hood
The code that runs this automation
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, state, notify
CAL, COUNTRIES = "team@yourco.example", ["GB", "DE"]
ROTA = ["Alex", "Sam", "Priya", "Jonas"]
@on_trigger
def run(event):
h = {"Authorization": f"Bearer {credentials.connection('google', 'work')}"}
start = date.today()
end = start + timedelta(days=14)
events = http.get(f"https://www.googleapis.com/calendar/v3/calendars/{CAL}/events", headers=h, params={
"timeMin": f"{start}T00:00:00Z", "timeMax": f"{end}T00:00:00Z", "singleEvents": True}).json().get("items", [])
holidays = {}
for c in COUNTRIES:
for d in http.get(f"https://date.nager.at/api/v3/PublicHolidays/{start.year}/{c}").json():
holidays.setdefault(d["date"], []).append(f"{d['localName']} ({c})")
conflicts = [f"• {e.get('summary')} on {e['start']['dateTime'][:10]}: {', '.join(holidays[e['start']['dateTime'][:10]])}"
for e in events if "dateTime" in e["start"] and e["start"]["dateTime"][:10] in holidays]
away = " ".join(e.get("summary", "") for e in events if "date" in e["start"] and e["start"]["date"] < str(start + timedelta(days=7)))
i = state.get("next") or 0
for _ in ROTA:
person, i = ROTA[i % len(ROTA)], i + 1
if person not in away:
break
state.set("next", i % len(ROTA))
notify.slack(f"On call this week: *{person}*\n" + ("Holiday conflicts:\n" + "\n".join(conflicts) if conflicts else "No holiday conflicts."), channel="#team")
return {"on_call": person, "conflicts": len(conflicts)}FAQ
Common questions
Which countries' holidays does it check?
How does it know someone is on leave?
Can I swap the on-call person by hand?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get today's calendar in a Slack message every morning
Each weekday at 7am a Slack message lists your meetings for the day, so you see your schedule where you already work.
See how it worksRemind interviewers in Slack ten minutes before each interview
Ten minutes before every interview on your hiring calendar, each interviewer gets a Slack message with the call link.
See how it worksGet a brief on external guests before each meeting
Half an hour before a meeting with people from outside your company, a short brief on their companies arrives in your Slack DMs.
See how it worksKeep exploring
Set up “Flag meetings on public holidays and post the on-call rota in Slack” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.