Add terminated hires to churn tracking sheet
When an employment is terminated in Personio, the leaver's name, dates, department and weekly hours are added to your central churn sheet, so payroll and recruiting work from the same list.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/add-terminated-hires-to-churn-tracking-sheet/
Paste into Claude, ChatGPT, Cursor or any agent.
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/add-terminated-hires-to-churn-tracking-sheet
Set it up with the CLI
- Add it. Copies the folder into
zaps/add-terminated-hires-to-churn-tracking-sheet/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/add-terminated-hires-to-churn-tracking-sheet - 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 add-terminated-hires-to-churn-tracking-sheet - Check it. Its recent runs, with status and errors.
npx zap-pack logs add-terminated-hires-to-churn-tracking-sheet
zaps/add-terminated-hires-to-churn-tracking-sheet/
- 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-sheets.tsThe
google-sheetsaccount it uses - connections/personio.tsThe
personioaccount it uses - triggers/employment-terminated.tsWhat starts it:
personioemployment_terminated_instant - 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: an employment is terminated in Personio (
personio,employment_terminated_instant). - Filter: the run continues only when the employee's department contains one of the names in
TRACKED_DEPARTMENTS, ignoring case. Any other department stops the run and writes nothing. - Format: the termination and hire dates become
DD/MM/YYYYtext, read from the date part only so a time zone never moves the day. - Google Sheets (
google-sheets) adds one new row to the churn sheet: full name, termination date, hire date, department and weekly working hours. It only adds rows and never changes an existing one; week and month columns are left to the sheet's own formulas.
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 | What goes there |
|---|---|
REPLACE_SPREADSHEET_ID |
The central churn sheet: ask which sheet it is, then look up its ID (the long ID in its URL) with the user's Google Sheets connection |
Also review the defaults with them:
WORKSHEET_ID: the tab. The first tab is"0".TRACKED_DEPARTMENTS(inworkflow.ts): the Personio departments to record, such as["Fulfillment", "Warehouse"]. Partial names match, soFulfillmentalso matchesFulfillment Berlin.NAME_COLUMN,TERMINATION_DATE_COLUMN,HIRE_DATE_COLUMN,DEPARTMENT_COLUMN,HOURS_COLUMN: column keys such asCOL$A, not header names. Map the user's headers to their column letters.
Also confirm, before building:
- Do the week and month columns already have formulas that read the termination date? The zap writes dates as
DD/MM/YYYYtext, so those formulas must parse that format.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/add-terminated-hires-to-churn-tracking-sheet, replace each REPLACE_… value as this file says, then run npx zap-pack deploy add-terminated-hires-to-churn-tracking-sheet, 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-sheets(the account that owns the churn sheet) to the user's Google Sheets connection, and the trigger'spersonioto the user's Personio connection, which needs API access to employee attributes. No app needs a connection of its own beyond these two. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/employment-terminated.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them. 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 connections and sample the trigger with the user's Personio connection before the first test run. Check that the record carries
department,hire_date,termination_dateandweekly_working_hoursunder those names; if any arrive under other keys, update the field reads inworkflow.tsto match the sample.
Test it
Run this sample as a draft test run, pointed at a copy of the churn sheet, with no real employee data:
{
"id": "100234",
"first_name": "Sam",
"last_name": "Rivera",
"email": "sam.rivera@example.com",
"department": { "name": "Fulfillment Berlin" },
"hire_date": "2024-03-04T00:00:00+01:00",
"termination_date": "2026-11-30T00:00:00+01:00",
"weekly_working_hours": "40"
}
Confirm one new row reads Sam Rivera, 30/11/2026, 04/03/2024, Fulfillment Berlin, 40, and that the week and month formulas fill in. Then run it again with "department": { "name": "Sales" } and confirm nothing is written. If run-status tools aren't available, check the copied sheet directly. Ask the user to delete the test row afterwards; the agent doesn't delete test data. Publish only after both runs pass, and confirm the trigger is active.
Notes
- Each termination adds a new row. If the same termination fires twice, the sheet gets two rows.
- A date that arrives in a format other than
YYYY-MM-DD...is written as received. - The sheet holds leaver data, so share it only with the people who need it, and never commit a real spreadsheet ID.
- To extend it: add a Slack or email step after the row is added to alert payroll when a leaver works high hours, for example 35 or more a week, or add a column for the recruiter or manager who owns the follow-up.