arazzo: 1.0.1 info: title: Google Sheets Archive and Clear Multiple Ranges summary: Read several ranges as an archive, clear them all in one batch, then re-read to confirm they are empty. description: >- A bulk reset flow that preserves a snapshot before wiping data. The workflow reads several ranges together as an archive snapshot, clears all of those ranges in a single batchClear, and then re-reads them to confirm the cells are now empty. 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: googleSheetsApi url: ../openapi/google-sheets-openapi.yml type: openapi workflows: - workflowId: archive-and-clear-multiple-ranges summary: Snapshot several ranges, clear them all, and confirm they are empty. description: >- Reads several ranges as an archive, clears them all in one batchClear, and re-reads them to confirm they were cleared. inputs: type: object required: - accessToken - spreadsheetId - ranges properties: accessToken: type: string description: OAuth 2.0 bearer access token with the spreadsheets scope. spreadsheetId: type: string description: The ID of the spreadsheet whose ranges should be archived and cleared. ranges: type: array description: The A1 notation ranges to snapshot, clear, and re-check. items: type: string steps: - stepId: archive description: Read all of the supplied ranges together as an archive snapshot. operationId: batchGetValues parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: spreadsheetId in: path value: $inputs.spreadsheetId - name: ranges in: query value: $inputs.ranges successCriteria: - condition: $statusCode == 200 outputs: archivedValueRanges: $response.body#/valueRanges - stepId: clearAll description: Clear every supplied range in a single batchClear call. operationId: batchClearValues parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: spreadsheetId in: path value: $inputs.spreadsheetId requestBody: contentType: application/json payload: ranges: $inputs.ranges successCriteria: - condition: $statusCode == 200 outputs: clearedRanges: $response.body#/clearedRanges - stepId: confirmEmpty description: Re-read the ranges to confirm they no longer hold values. operationId: batchGetValues parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: spreadsheetId in: path value: $inputs.spreadsheetId - name: ranges in: query value: $inputs.ranges successCriteria: - condition: $statusCode == 200 outputs: remainingValueRanges: $response.body#/valueRanges outputs: archivedValueRanges: $steps.archive.outputs.archivedValueRanges clearedRanges: $steps.clearAll.outputs.clearedRanges remainingValueRanges: $steps.confirmEmpty.outputs.remainingValueRanges