Google Sheets · Arazzo Workflow

Google Sheets Seed a Range Only If Empty

Version 1.0.0

Read a range and branch — write seed values only when the range has no existing data.

1 workflow 1 source API 1 provider
View Spec View on GitHub Google WorkspaceProductivitySpreadsheetsArazzoWorkflows

Provider

google-sheets

Workflows

seed-if-empty
Write seed values into a range only when that range is currently empty.
Reads a range and writes the supplied seed values only when no values are present, leaving an already-populated range untouched.
2 steps inputs: accessToken, range, spreadsheetId, values outputs: existingValues, seededCells, seededRange
1
checkRange
Read the target range and branch on whether it already contains any values.
2
seedRange
Write the supplied seed values into the empty range using USER_ENTERED interpretation.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Google Sheets Seed a Range Only If Empty
  summary: Read a range and branch — write seed values only when the range has no existing data.
  description: >-
    An idempotent seeding pattern that avoids clobbering data that is already
    present. The workflow reads the target range, and then branches: when the
    range already contains values it leaves them untouched, and when the range
    is empty it writes the supplied seed values. 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: valuesApi
  url: ../openapi/google-sheets-values-api-openapi.yml
  type: openapi
workflows:
- workflowId: seed-if-empty
  summary: Write seed values into a range only when that range is currently empty.
  description: >-
    Reads a range and writes the supplied seed values only when no values are
    present, leaving an already-populated range untouched.
  inputs:
    type: object
    required:
    - accessToken
    - spreadsheetId
    - range
    - values
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 bearer access token with the spreadsheets scope.
      spreadsheetId:
        type: string
        description: The ID of the spreadsheet to seed.
      range:
        type: string
        description: The A1 notation range to check and conditionally seed.
      values:
        type: array
        description: A two-dimensional array of seed cell values to write when the range is empty.
        items:
          type: array
          items: {}
  steps:
  - stepId: checkRange
    description: >-
      Read the target range and branch on whether it already contains any
      values.
    operationId: getValues
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: spreadsheetId
      in: path
      value: $inputs.spreadsheetId
    - name: range
      in: path
      value: $inputs.range
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      existingValues: $response.body#/values
    onSuccess:
    - name: rangeEmpty
      type: goto
      stepId: seedRange
      criteria:
      - context: $response.body
        condition: $.values.length == 0
        type: jsonpath
    - name: rangeHasData
      type: end
      criteria:
      - context: $response.body
        condition: $.values.length > 0
        type: jsonpath
  - stepId: seedRange
    description: >-
      Write the supplied seed values into the empty range using USER_ENTERED
      interpretation.
    operationId: updateValues
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: spreadsheetId
      in: path
      value: $inputs.spreadsheetId
    - name: range
      in: path
      value: $inputs.range
    - name: valueInputOption
      in: query
      value: USER_ENTERED
    requestBody:
      contentType: application/json
      payload:
        range: $inputs.range
        majorDimension: ROWS
        values: $inputs.values
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      updatedRange: $response.body#/updatedRange
      updatedCells: $response.body#/updatedCells
  outputs:
    existingValues: $steps.checkRange.outputs.existingValues
    seededRange: $steps.seedRange.outputs.updatedRange
    seededCells: $steps.seedRange.outputs.updatedCells

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-sheets-seed-if-empty-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.