Assign on-call contact from next calendar event to roster
Shortly before an on-call shift starts, the calendar event is updated with the responder's contact, so coordinators see who is on call without opening a roster.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/assign-on-call-contact-from-next-calendar-event-to-roster/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Engineering · Engineering operations
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/assign-on-call-contact-from-next-calendar-event-to-roster
Set it up with the CLI
- Add it. Copies the folder into
zaps/assign-on-call-contact-from-next-calendar-event-to-roster/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/assign-on-call-contact-from-next-calendar-event-to-roster - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy assign-on-call-contact-from-next-calendar-event-to-roster - Check it. Its recent runs, with status and errors.
npx zap-pack logs assign-on-call-contact-from-next-calendar-event-to-roster
zaps/assign-on-call-contact-from-next-calendar-event-to-roster/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 2 to fill in
- connections/google-calendar.tsThe
google-calendaraccount it uses - triggers/event-start.tsWhat starts it:
google-calendarevent_start1 to fill in - workflow.tsThe code; each
ctx.stepis a step in the Zap 1 to fill in
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger:
google-calendar, Event Start (event_start). It fires 15 minutes before any event on the chosen calendar starts. - Resolve contact: the event title is checked against a roster of rotation names. The first name found sets the contact. If none matches, the default contact is used.
google-calendarupdates that event's description. Any earlierOn call:line is removed, thenOn call: <contact>is appended.
Attendees are not changed and no invitation is sent.
Ask the user
Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | Where | What goes there |
|---|---|---|
REPLACE_CALENDAR_ID |
triggers/event-start.ts, calendarid; config.ts, CALENDAR_ID |
The Google Calendar that holds the rotation events. The trigger watches it and the update writes to its events. |
REPLACE_DEFAULT_CONTACT |
config.ts, DEFAULT_CONTACT |
The email written when no rotation name in the event title matches ROSTER. |
REPLACE_ROTATION_NAME |
workflow.ts, ROSTER (key) |
A rotation's name as it appears in event titles. Matching is a case-insensitive substring check. One line per rotation. |
REPLACE_CONTACT_EMAIL |
workflow.ts, ROSTER (value) |
That rotation's on-call contact, as an email address. |
Also review the defaults with them: CONTACT_LABEL ("On call:", the prefix for the line in the description; keep it unless the team already uses another label).
Before turning it on, confirm the user is happy for the workflow to run on every event on that calendar 15 minutes before it starts, so it should only be enabled on a calendar where that is wanted.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/assign-on-call-contact-from-next-calendar-event-to-roster, replace each REPLACE_… value as this file says, then run npx zap-pack deploy assign-on-call-contact-from-next-calendar-event-to-roster, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
google-calendarto the user's Google Calendar connection for the account that owns the rotation calendar and can edit its events. The trigger and the action use the same one. No other app needs a connection. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/event-start.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them, includingcalendarid,time_unit(minutes) andtime_length(15). The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyis the trigger'sevent, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create, test and publish the workflow. - Fields: inspect each action's fields with the user's connection and sample the trigger before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Run it once as a draft test (run_workflow_draft in Zapier MCP) against an event on the rotation calendar that the user can safely edit. Use an event like this one, titled for a rotation the user has in ROSTER:
{
"id": "p5dt387smdbp4qn2mhe2shkqjc",
"summary": "[install-test] platform on-call",
"description": "[install-test] created by install test; safe to delete",
"start": { "dateTime": "2026-10-30T06:00:00-04:00" }
}
Confirm three things. The event's description ends with one On call: <contact> line, and that line is the expected contact. A second run on the same event leaves exactly one On call: line, not two. The event's attendees are unchanged. If run-status tools aren't available, check the event in Google Calendar directly. Ask the user to delete the test event; the agent doesn't delete test data. Then publish and confirm the trigger is active.
Notes
- The spec asked to publish the contact to a team roster or usergroup. No roster app was specified, so the Zap writes the contact into the event description, where coordinators see it. Swap in a roster app's action if the team has one.
- The contact goes into the description, not an attendee slot. An attendee slot would invite that person, which needs their agreement.
- Editing an event's description replaces it, so the Zap keeps the existing text and only swaps the
On call:line. - The Zap fires only for the calendar in the trigger. Use a calendar where editing event descriptions is safe.
- The Zap's sub-lookup is done inline: no separate sub-workflow was needed.
- To post a confirmation after the contact is written, add a Slack message to the team channel after the update.
- To route high-priority events to a second roster, add a second map in
workflow.tsand choose it by event title. - Never commit a real calendar ID or contact email in a shared copy. Replace them with placeholders, as in
workflow.ts.