Legal-hold BambooHR terminations in Google Vault before deletion

By General Input

Every weekday at 6pm, catch new BambooHR terminations, place their Google Workspace mail, drive, groups, and chat on legal hold, and confirm in Slack before IT deletes the account.

Integrations

  • BambooHR
  • Google Vault
  • Slack

Type

Agentic Task

Categories

  • HR & People
  • Operations

Every weekday at 6pm local time, run an agent that catches newly terminated employees in BambooHR and places their Google Workspace data on legal hold in Google Vault before offboarding IT can delete the account. Google Workspace license reassignment and account cleanup typically start within 24 hours of a termination, so the hold has to land the same day HR enters the change.

Start by calling BambooHR Get Changed Employees with a since timestamp of the previous run (default to 24 hours ago on the first run) to find every employee whose record changed. For each changed employee, call BambooHR Get Employee to read at least their work email, department, job title, employment status, termination date, and any tags. Keep only the ones whose status just flipped to terminated, or whose termination date is today or in the very near past.

For each qualifying leaver, decide whether preservation is required. Default to yes for anyone in a preservation-required role: executives, finance, sales, engineering, HR, legal, or anyone whose BambooHR record carries an open-matter tag. For anyone outside those buckets, skip the hold and record the reason (for example: 'individual contributor in a non-preservation department, no open matter tag').

For each person you are holding, first call Google Vault List Matters to look for an existing matter named after this person and their termination date (something like 'Preservation: Jane Doe (2026-07-12)'). If none exists, call Google Vault Create Matter with that name and a short description referencing the BambooHR employee ID and termination date. Then call Google Vault Create Hold on that matter, scoped by account to the person's Google Workspace email, with the corpora set to cover Mail, Drive, Groups, and Chat (one hold per corpus if the API requires, or a single hold if it supports multiple corpora).

Finally, post a single confirmation to the #legal-holds Slack channel using Slack Send a Message. Format it as a short digest: a header with today's date, then two sections. The first section lists everyone you preserved, with their name, department, termination date, and the matter name. The second section lists everyone you deliberately did not hold, each with a one-line reason. If there were no terminations, post a brief 'no new terminations today' note so the team knows the workflow ran.

Business rules to bake in: never create a duplicate matter for the same person and termination date; if Create Hold fails for one corpus, still attempt the others and note the partial failure in the Slack recap; if a person appears in the changed feed but is not actually terminated (for example, a rehire or a name change), ignore them silently; treat BambooHR's timezone as authoritative for termination-date comparisons.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes