Google Workspace · Arazzo Workflow

Google Workspace Decommission an Org Unit

Version 1.0.0

Move a user out of an org unit, then delete the now-empty unit.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub CalendarCollaborationEmailProductivityStorageVideo ConferencingArazzoWorkflows

Provider

google-workspace

Workflows

decommission-org-unit
Empty an org unit by moving its user out, then delete the unit.
Confirms the source org unit exists, patches the user's orgUnitPath to a destination unit to empty the source, and deletes the now-empty source org unit.
3 steps inputs: accessToken, customerId, destinationOrgUnitPath, orgUnitPath, userKey outputs: deletedOrgUnitId, movedUserId, movedUserOrgUnitPath
1
confirmOrgUnit
Read the source organizational unit to confirm it exists before emptying and deleting it.
2
moveUserOut
Patch the user's orgUnitPath to the destination unit so the source organizational unit becomes empty.
3
deleteOrgUnit
Delete the now-empty source organizational unit.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Google Workspace Decommission an Org Unit
  summary: Move a user out of an org unit, then delete the now-empty unit.
  description: >-
    Retires an organizational unit that must be emptied before it can be
    removed. The workflow confirms the org unit exists, moves the supplied user
    out to a destination unit so the source becomes empty, and then deletes the
    source unit. Only empty organizational units can be deleted, so the move
    step is a precondition for the delete. Every step spells out its request
    inline so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-620.20
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-620.20
      capability_name: Identity & Access Management
      spec: google-workspace-users-api-openapi.yml
      confidence: 0.85
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: orgunitsApi
  url: ../openapi/google-workspace-orgunits-api-openapi.yml
  type: openapi
- name: usersApi
  url: ../openapi/google-workspace-users-api-openapi.yml
  type: openapi
workflows:
- workflowId: decommission-org-unit
  summary: Empty an org unit by moving its user out, then delete the unit.
  description: >-
    Confirms the source org unit exists, patches the user's orgUnitPath to a
    destination unit to empty the source, and deletes the now-empty source org
    unit.
  inputs:
    type: object
    required:
    - accessToken
    - orgUnitPath
    - userKey
    - destinationOrgUnitPath
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 bearer access token with the orgunit and user scopes.
      orgUnitPath:
        type: string
        description: The full path (minus leading slash) of the org unit to decommission.
      userKey:
        type: string
        description: Primary email, alias, or unique id of the user to move out.
      destinationOrgUnitPath:
        type: string
        description: The org unit path to move the user into before deleting the source.
      customerId:
        type: string
        description: Customer account id or the my_customer alias.
        default: my_customer
  steps:
  - stepId: confirmOrgUnit
    description: >-
      Read the source organizational unit to confirm it exists before emptying
      and deleting it.
    operationId: getOrgUnit
    parameters:
    - name: customerId
      in: path
      value: $inputs.customerId
    - name: orgUnitPath
      in: path
      value: $inputs.orgUnitPath
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      orgUnitId: $response.body#/orgUnitId
  - stepId: moveUserOut
    description: >-
      Patch the user's orgUnitPath to the destination unit so the source
      organizational unit becomes empty.
    operationId: patchUser
    parameters:
    - name: userKey
      in: path
      value: $inputs.userKey
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    requestBody:
      contentType: application/json
      payload:
        orgUnitPath: $inputs.destinationOrgUnitPath
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      userId: $response.body#/id
      orgUnitPath: $response.body#/orgUnitPath
  - stepId: deleteOrgUnit
    description: >-
      Delete the now-empty source organizational unit.
    operationId: deleteOrgUnit
    parameters:
    - name: customerId
      in: path
      value: $inputs.customerId
    - name: orgUnitPath
      in: path
      value: $inputs.orgUnitPath
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    successCriteria:
    - condition: $statusCode == 204
  outputs:
    deletedOrgUnitId: $steps.confirmOrgUnit.outputs.orgUnitId
    movedUserId: $steps.moveUserOut.outputs.userId
    movedUserOrgUnitPath: $steps.moveUserOut.outputs.orgUnitPath

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/google-workspace-decommission-org-unit-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.