Offboard terminated Workday employees in Okta and Google Workspace
When someone is terminated in Workday, IT gets a Slack heads-up, and at the end of their last day the zap removes their Okta and Google Workspace access and posts what worked, what failed and what's left to do by hand.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/offboard-terminated-workday-employees-in-okta-and-google-workspace/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Human Resources (HR) · HR operations
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/offboard-terminated-workday-employees-in-okta-and-google-workspace
Set it up with the CLI
- Add it. Copies the folder into
zaps/offboard-terminated-workday-employees-in-okta-and-google-workspace/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/offboard-terminated-workday-employees-in-okta-and-google-workspace - 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 offboard-terminated-workday-employees-in-okta-and-google-workspace - Check it. Its recent runs, with status and errors.
npx zap-pack logs offboard-terminated-workday-employees-in-okta-and-google-workspace
zaps/offboard-terminated-workday-employees-in-okta-and-google-workspace/
- 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 4 to fill in
- connections/google-workspace-admin.tsThe
google-workspace-adminaccount it uses - connections/okta.tsThe
oktaaccount it uses - connections/slack.tsThe
slackaccount it uses - connections/workday.tsThe
workdayaccount it uses - triggers/employee-terminated.tsWhat starts it:
workdayemployee_terminated3 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: an employee is terminated in Workday (
workday,employee_terminated), with the worker's name, primary work email and termination date chosen in the trigger's fields. - No work email: if the trigger sent none, Slack alerts the IT channel to offboard by hand and the run stops. Nothing is removed.
- Slack posts a heads-up to the IT channel with the person's name, email and when access will be removed. It posts as the Zapier bot, with mentions and link previews turned off.
- Wait: until 23:00 UTC on the termination date. If that time has passed, or Workday sent no date, access is removed right away.
- Okta finds the user by email and deactivates them (or suspends them, if configured). Deactivation runs Okta's own deprovisioning, which covers Slack and other apps provisioned through Okta.
- Google Workspace Admin finds the user by email and suspends them. The account isn't deleted, so their Drive, mail and calendar stay intact for handover.
- Slack posts a summary: one line per system marked done or failed with the reason, then the manual follow-ups.
Each system is handled on its own: a missing Okta user or a failed Google suspension is reported in the summary without stopping the other step. The Zap never deletes an account.
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_IT_CHANNEL_ID |
The Slack channel where IT and People Ops track offboarding, by its ID (C…) |
REPLACE_…_FIELD_CHOICE (trigger) |
The Workday report fields for name, work email and termination date (look these up; don't ask) |
REPLACE_…_FIELD (config.ts) |
The trigger output keys for those three fields (sample the trigger; don't ask) |
Also review the defaults with them:
OKTA_OFFBOARD_ACTION(workflow.ts):"deactivate_user"(default) or"suspend_user". Deactivation triggers Okta's downstream deprovisioning; suspension keeps the account recoverable but leaves app assignments alone. Which does their IT team want on the last day?ACCESS_CUTOFF_UTC_HOUR(workflow.ts): the UTC hour on the termination date when access is cut. Defaults to 23, the end of the US business day. Where are most of their people based?MANUAL_FOLLOW_UPS(workflow.ts): the checklist at the end of the summary. Does it match what their IT team still does by hand?
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/offboard-terminated-workday-employees-in-okta-and-google-workspace, replace each REPLACE_… value as this file says, then run npx zap-pack deploy offboard-terminated-workday-employees-in-okta-and-google-workspace, 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 Offboard terminated Workday employees in Okta and Google Workspace (zapier.sh/offboard-terminated-workday-employees-in-okta-and-google-workspace): 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
workday(can read terminated employees) to the user's Workday connection,okta(an Okta admin who can manage users) to their Okta connection,google-workspace-admin(a Google Workspace admin who can suspend users) to their Google Workspace Admin connection, andslack(the workspace with the IT channel) to their Slack connection. Every app in this zap needs a connection. - Trigger fields: call
get_trigger_field_choicesforfieldson Workday'semployee_terminatedtrigger with the user's connection, and put the choices for the worker's name, primary work email and termination date intriggers/employee-terminated.ts. Then sample the trigger and setWORK_EMAIL_FIELD,NAME_FIELDandTERMINATION_DATE_FIELDinconfig.tsto the output keys holding those values. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced.triggers/employee-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 before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
This zap removes real access, so test only against a throwaway user that exists in both Okta and Google Workspace, and confirm with the user before running. Set cutoff_wait_seconds so the run doesn't wait for a real date. Run this sample once as a draft test, with the keys renamed to the ones in config.ts and the email set to that test user:
{
"employeeID": "99999",
"worker": "Test Leaver",
"email_PrimaryWork": "test.leaver@example.com",
"terminationDate": "2026-01-15",
"cutoff_wait_seconds": 5
}
Check that the heads-up and the summary both landed in the IT channel, that the summary shows Okta and Google Workspace as done, and that the test user is deactivated (or suspended) in Okta and suspended in Google Workspace. If run-status tools aren't available, check Slack, the Okta admin console and the Google Admin console directly. Ask the user to reactivate the test user and delete the test messages; the agent doesn't undo test changes. Then publish, and tell the user to confirm the trigger is active before relying on it.
Notes
- Workday's trigger can fire when the termination is entered, which may be weeks before the last day. The run waits until the termination date, so a rescinded termination still cuts access unless someone cancels the run.
- Okta and Google Workspace matches use the Workday primary work email, so it must be the same address people sign in with.
- Suspending a Google Workspace user keeps their license assigned. Reclaim it after handover, or add a Revoke License step if they want it freed on the last day.
- If Slack isn't provisioned through Okta, deactivate the Slack user by hand; Zapier's Slack integration has no deactivate action.
- To customize: add a "remove from groups" step in Okta or Google Workspace, or DM the manager with the Drive transfer reminder.
- Never commit a real channel ID or email address.