Free n8n template

Employee offboarding n8n template

What it does

An importable n8n workflow that takes an HR departure request, sets the access cutoff, and emails the manager a Claude-drafted handoff checklist right away. At the cutoff it suspends the Google Workspace account, signs out every session, transfers Drive files to the manager, opens a Jira ticket listing the remaining apps for IT, and writes an audit row. You need self-hosted n8n, Google Workspace admin access, Jira Cloud, Gmail, Google Sheets, Slack and an Anthropic API key.

What this workflow does

  1. HR offboarding request (Webhook with header auth) accepts a restricted HR form post or a BambooHR webhook.
  2. Validate and schedule cutoff (Code) checks required fields and sets the cutoff: 6pm on the last day for voluntary departures, the exact time HR gives for involuntary ones. Dates more than two days in the past stop for a human check.
  3. Draft handoff checklist with Claude (HTTP Request) builds a structured list of work to hand over, files to check and questions for the manager, from role, apps and open work only. Parse handoff draft (Code) handles refusals and missing output, and Email draft to manager (Gmail) sends it during the notice period.
  4. Wait until cutoff (Wait) pauses this execution until the cutoff time.
  5. Suspend Google account (Google Workspace Admin) suspends the user, and Sign out all sessions (HTTP Request to the Admin SDK) ends active sessions.
  6. Get manager account and Transfer Drive files to manager (Data Transfer API) move private and shared Drive files.
  7. Build IT ticket and audit row (Code) lists every app outside Google sign-in, token and password rotation, equipment return and payroll notice.
  8. Append audit log (Google Sheets) records what was done and when, and Create IT ticket in Jira hands the rest to IT.
  9. Post exception to Slack fires on any failed step, so someone checks access by hand.

Before you import

  • Self-hosted n8n. This workflow holds admin credentials and should run on infrastructure you control.
  • A Google Workspace admin OAuth2 credential with custom scopes: the defaults plus admin.directory.user.security (sign-out) and admin.datatransfer (Drive transfer).
  • An access inventory: the apps each person may have that are not behind Google sign-in. App deprovisioning APIs are often gated by plan tier, so many apps stay on the IT ticket.
  • An Anthropic API key. The template uses claude-opus-5-5; claude-haiku-5-5 is cheaper for high-volume, simple classification.

Setup

  1. Import the JSON and connect all credentials. Create a Header Auth credential and send that header from your HR form.
  2. Replace REPLACE_WITH_DRIVE_APPLICATION_ID with the Drive and Docs ID from the Data Transfer API’s applications list.
  3. Create an Audit tab with the headers in the sticky note and replace REPLACE_WITH_SHEET_ID.
  4. Replace REPLACE_WITH_JIRA_PROJECT_ID, REPLACE_WITH_JIRA_ISSUE_TYPE_ID and REPLACE_WITH_SLACK_EXCEPTIONS_CHANNEL_ID.
  5. In Validate and schedule cutoff, set TZ, DEFAULT_APPS and the BambooHR field names if you use its webhook.

Test it

Create a dummy Google user that owns a few Drive files and is signed in on a browser. Post an involuntary request with cutoff_at five minutes out. The manager should get the handoff draft immediately. After the cutoff, the dummy user should be signed out and unable to sign in, the files should appear in the manager’s Drive, a Jira ticket should list the apps, and the Audit tab should have one row.

Make it production-ready

  • Write separate voluntary and involuntary runbooks, including who is told and when.
  • Revoke app access through SCIM or each app’s API as you add them, and remove OAuth grants and tokens the user created.
  • Convert the mailbox to a shared mailbox or forward it, and reassign recurring meetings.
  • Restrict who can call the webhook, add an n8n error workflow, and confirm data transfer finished before any account deletion.

Read the full guide on automating employee offboarding, see automating user provisioning for the identity side, or talk to Lumeor about Microsoft Entra ID.

Next steps