arazzo: 1.0.1 info: title: Google Workspace Inspect the Org Unit Tree summary: List all child org units under a path, then read the first one in detail. description: >- Explores the organizational unit hierarchy. The workflow lists every organizational unit beneath a starting path, then reads the first returned unit in full to capture its parent path and id. This is a read-only discovery flow useful for building an admin tree view. 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 sourceDescriptions: - name: directoryApi url: ../openapi/admin-sdk-directory-api.yml type: openapi workflows: - workflowId: inspect-org-unit-tree summary: List child org units under a path and read the first in detail. description: >- Lists organizational units beneath the supplied path, then reads the first returned unit by its path to capture its full detail. inputs: type: object required: - accessToken - orgUnitPath properties: accessToken: type: string description: OAuth 2.0 bearer access token with the admin.directory.orgunit.readonly scope. orgUnitPath: type: string description: The starting org unit path (minus leading slash) to list children under. customerId: type: string description: Customer account id or the my_customer alias. default: my_customer steps: - stepId: listOrgUnits description: >- List all child organizational units beneath the supplied path. operationId: listOrgUnits parameters: - name: customerId in: path value: $inputs.customerId - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: type in: query value: children - name: orgUnitPath in: query value: $inputs.orgUnitPath successCriteria: - condition: $statusCode == 200 outputs: organizationUnits: $response.body#/organizationUnits firstChildPath: $response.body#/organizationUnits/0/orgUnitPath - stepId: readFirstChild description: >- Read the first returned child organizational unit in full to capture its parent path and id. operationId: getOrgUnit parameters: - name: customerId in: path value: $inputs.customerId - name: orgUnitPath in: path value: $steps.listOrgUnits.outputs.firstChildPath - name: Authorization in: header value: "Bearer $inputs.accessToken" successCriteria: - condition: $statusCode == 200 outputs: orgUnitId: $response.body#/orgUnitId name: $response.body#/name parentOrgUnitPath: $response.body#/parentOrgUnitPath outputs: organizationUnits: $steps.listOrgUnits.outputs.organizationUnits firstChildId: $steps.readFirstChild.outputs.orgUnitId firstChildName: $steps.readFirstChild.outputs.name