Sync new leave events from Google Calendar to personal calendar
When a new leave event appears on a Google Calendar you watch, a copy is created on your personal calendar, so planning on your own schedule reflects it.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/copy-leave-events-to-personal-google-calendar/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Personal Productivity · Scheduling coordination
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/copy-leave-events-to-personal-google-calendar
Set it up with the CLI
- Add it. Copies the folder into
zaps/copy-leave-events-to-personal-google-calendar/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/copy-leave-events-to-personal-google-calendar - 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 copy-leave-events-to-personal-google-calendar - Check it. Its recent runs, with status and errors.
npx zap-pack logs copy-leave-events-to-personal-google-calendar
zaps/copy-leave-events-to-personal-google-calendar/
- 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 1 to fill in
- connections/google-calendar.tsThe
google-calendaraccount it uses - triggers/new-event.tsWhat starts it:
google-calendarnew_event1 to fill in - workflow.tsThe code; each
ctx.stepis a step in the Zap
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: a new event is created on the source Google Calendar (
google-calendar,new_event). - Filter (in code): the event is skipped if it is cancelled, if its title doesn't match the leave pattern (
leave,PTO,OOO,out of office,vacationorholiday, case-insensitive), or if it has no start or end. Nothing is created for skipped events. - Google Calendar creates a copy on the personal calendar with the same title, start, end, all-day setting, description and location, shown as busy.
Ask the user
Each REPLACE_… value is set per person. Resolve calendar names to IDs with the user's own Google Calendar connection; don't ask them to paste an ID you can look up.
| Setting | Where | What goes there |
|---|---|---|
REPLACE_SOURCE_CALENDAR |
triggers/new-event.ts, calendarid |
The calendar that holds leave events, such as a team or leave calendar |
REPLACE_TARGET_CALENDAR |
config.ts |
The personal calendar that receives the copies. The connected account needs edit access to it |
Also review LEAVE_PATTERN at the top of workflow.ts with them. Add the words their team uses for leave, such as a local term for time off.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/copy-leave-events-to-personal-google-calendar, replace each REPLACE_… value as this file says, then run npx zap-pack deploy copy-leave-events-to-personal-google-calendar, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. Either way, name the workflow Sync new leave events from Google Calendar to personal calendar (zapier.sh/copy-leave-events-to-personal-google-calendar): zap-pack takes that name from this file's title, so leave the title as it is, and with Zapier MCP give the workflow that name when you create it. 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. The trigger and the action use the same one, so it must be able to read the source calendar and edit the personal calendar. If they sit in different Google accounts, a single connection can't reach both; share one calendar with the other account first. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/new-event.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them, includingcalendarid. 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 the action's fields with the user's connection and sample the trigger before the first test run. Confirm the keys for the all-day setting (
all_day) and the busy setting (transparency, set toopaque), and how an all-day event's start and end dates are entered, and fix any key or value inworkflow.tsthat doesn't match.
Test it
Run this sample as a draft test run before publishing. Point TARGET_CALENDAR_ID at a calendar that is safe to write to:
{
"id": "hjerpm2k1ov4vq2uf6215hg718",
"summary": "[install-test] PTO",
"description": "[install-test] Sample leave event. Safe to delete.",
"location": "[install-test] Home",
"status": "confirmed",
"start": { "dateTime": "2026-11-03T09:00:00-05:00" },
"end": { "dateTime": "2026-11-03T17:00:00-05:00" }
}
The run should create one event on the target calendar with the same title, description, location and time. A second sample with a title such as [install-test] Team lunch should be skipped with not-a-leave-event. If run-status tools aren't available, check the result in Google Calendar directly. The user deletes the test event, not the agent. Then publish, confirm the trigger is active, and tell the user which events it copies.
Notes
- The trigger fires on new events only. Edits and cancellations on the source calendar are not synced, so a changed or cancelled leave event leaves its old copy in place.
- For a sync that also handles updates, see
create-company-calendar-events-from-personal-calendar-updates. - All-day leave events are copied as all-day. Google gives an all-day event an exclusive end date, so the agent must confirm on the first sample that the copy spans the same days.
- No attendees are copied, so the copy sends no invitations.
- The title test is a simple word match, so a title such as "Holiday party" is copied too. Tighten
LEAVE_PATTERNif that matters. - Google Calendar can also create the copy as an Out of Office event (
eventType: "outOfOffice"), which auto-declines meetings during the leave. It is left as a standard busy event so it works on every calendar type; switch it if the user wants auto-declines.