Daily Google Groups offboarding sweep from BambooHR

By General Input

Each weekday at 6am ET, find yesterday's BambooHR terminations, hand off their group ownership to their manager, and remove them from every Google Group.

Integrations

  • BambooHR
  • Google Groups
  • Slack Bot

Type

Agentic Task

Categories

  • HR & People
  • Operations

Build me an agent workflow that runs every weekday at 6am America/New_York and closes out Google Groups access for any employee whose last day in BambooHR was yesterday, so their group access is cut before the next workday starts. Use BambooHR, Google Groups, and Slack Bot.

Step 1. Find yesterday's leavers. Call BambooHR Get Employee Directory and filter to employees whose termination date equals yesterday in America/New_York. For each match, capture their BambooHR employee id, full name, and work email. If nobody matches, post a short Slack recap saying there were no offboardings today and stop.

Step 2. For each departing employee, call Google Groups Search Direct Groups with their work email to get every group they directly belong to. For each of those groups, call Google Groups List Memberships and find the departing person's membership so you know their roles (MEMBER, MANAGER, or OWNER).

Step 3. Ownership handoff first, always. For any group where the departing person is an OWNER or MANAGER, look up their manager in BambooHR with Get Employee (use the supervisor / manager field on the departing employee's record) and get the manager's work email. Look for the manager in the same group's memberships. If the manager is already a member, use Google Groups Modify Membership Roles to promote them to OWNER. If the manager is not in the group, use Create Membership to add them as OWNER. Only proceed to Step 4 for that group once an OWNER other than the departing person is in place.

Never strip the last owner from a group. If the departing person is the sole owner and (a) their BambooHR manager is missing, (b) the manager's email is not in your Google Workspace domain, or (c) the role promotion fails, skip the deletion for that group and add it to the 'needs human attention' list for the recap.

Step 4. Once ownership is safe, call Google Groups Delete Membership to remove the departing employee from every group returned in Step 2. Track per person: total groups removed, every ownership handoff that happened (which group, who got promoted), and every group that was skipped with the reason.

Step 5. Post one Slack Bot Send a Message to #it-offboarding (let me change the channel later). Group the recap by departing employee. For each person show: name and work email, number of groups removed, ownership transfers (group name and new owner), and any groups that need human attention with a one-line reason such as 'sole owner, no manager on file' or 'external-only owners left'. End with a one-line summary across all employees processed.

Reason about ownership edge cases instead of pushing through them: external-only owners, deactivated managers, nested groups, and missing manager records should land in the recap, not silently leave an orphan group behind. If BambooHR or Google Groups returns an error for a specific person or group, keep going for the others and include the failure in the recap.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them