Rotate on-call schedules around leave and holidays with Google Calendar, Slack and Nager.Date
Ready for 3.0What this workflow does
This workflow has 23 nodes and runs on a schedule (every week at 10:00) (plus 1 other trigger). Along the way it connects Google Calendar and Slack.
How it runs
Trigger: On a schedule (every week at 10:00) (plus 1 other trigger).
- Rota Rules (Edit Fields (Set)): sets 8 fields: team, holiday_country, lead_slack_id…
- Read Past On-Call Weeks (Google Calendar): get many (event)
- Read The Leave Calendar (Google Calendar): get many (event)
- Read Public Holidays (HTTP Request): calls an HTTP API
- Combine History, Leave And Holidays (Merge): merges the data from its input branches
- Decide The On-Call Week (Code): runs custom JavaScript code
- What Now For The Week? (Switch): routes items into 4 branches
- Book The On-Call Week (Google Calendar): create (event)
- Escalate: Nobody Available (Slack): post (message)
- Put The Week Back (Google Calendar): update (event)
…plus 11 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (11)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Calendar Trigger
n8n-nodes-base.googleCalendarTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Calendar
n8n-nodes-base.googleCalendar - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Slack
n8n-nodes-base.slack - Wait
n8n-nodes-base.wait - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches
From the author
Quick overview This workflow rotates weekly on-call duty using Google Calendar events, factoring in team history, leave, and public holidays from the Nager.Date API, then announces the assignment and swap outcomes in Slack and updates a channel topic at…