Google Forms · Arazzo Workflow

Google Forms Renew an Expiring Watch

Version 1.0.0

List a form's watches and renew the existing one, or create a replacement when none survives.

1 workflow 1 source API 1 provider
View Spec View on GitHub Data CollectionFormsGoogleGoogle WorkspaceQuestionnairesResponsesSurveysArazzoWorkflows

Provider

google-forms

Workflows

renew-expiring-watch
Keep a form's response watch alive across its seven-day expiry.
Reads the current watches on the form, renews the first one if it exists, and otherwise creates a fresh watch so notification delivery resumes.
3 steps inputs: eventType, formId, topicName outputs: renewedExpireTime, renewedWatchId, replacementExpireTime, replacementWatchId
1
listCurrentWatches
List the watches this project owns on the form. An empty list means the previous watch already expired and was dropped by the service.
2
renewExisting
Renew the existing watch for seven days from now. This preserves the watch id, so no downstream subscriber configuration has to change.
3
createReplacement
Create a replacement watch against the same Pub/Sub topic when no watch survived. The new watch carries a new id.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Google Forms Renew an Expiring Watch
  summary: List a form's watches and renew the existing one, or create a replacement when none survives.
  description: >-
    Google Forms watches expire seven days after creation, which makes renewal a
    recurring job rather than a one-time setup step. This workflow lists the
    watches owned by the calling project on a form and then branches: when a
    watch is still registered it is renewed for another seven days, and when the
    list comes back empty the watch has already lapsed and a replacement is
    created against the same Pub/Sub topic. Run it on a schedule well inside the
    seven-day window. 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: watchesApi
  url: ../openapi/google-forms-watches-api-openapi.yml
  type: openapi
workflows:
- workflowId: renew-expiring-watch
  summary: Keep a form's response watch alive across its seven-day expiry.
  description: >-
    Reads the current watches on the form, renews the first one if it exists, and
    otherwise creates a fresh watch so notification delivery resumes.
  inputs:
    type: object
    required:
    - formId
    - topicName
    properties:
      formId:
        type: string
        description: The id of the watched form.
      topicName:
        type: string
        description: >-
          Fully qualified Pub/Sub topic used when a replacement watch has to be
          created, e.g. projects/my-project/topics/forms-notifications.
      eventType:
        type: string
        description: The event type for a replacement watch, either RESPONSES or SCHEMA.
        default: RESPONSES
  steps:
  - stepId: listCurrentWatches
    description: >-
      List the watches this project owns on the form. An empty list means the
      previous watch already expired and was dropped by the service.
    operationId: listWatches
    parameters:
    - name: formId
      in: path
      value: $inputs.formId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      watches: $response.body#/watches
      existingWatchId: $response.body#/watches/0/id
      existingExpireTime: $response.body#/watches/0/expireTime
    onSuccess:
    - name: watchExists
      type: goto
      stepId: renewExisting
      criteria:
      - context: $response.body
        condition: $.watches.length > 0
        type: jsonpath
    - name: watchLapsed
      type: goto
      stepId: createReplacement
      criteria:
      - context: $response.body
        condition: $.watches.length == 0
        type: jsonpath
  - stepId: renewExisting
    description: >-
      Renew the existing watch for seven days from now. This preserves the watch
      id, so no downstream subscriber configuration has to change.
    operationId: renewWatch
    parameters:
    - name: formId
      in: path
      value: $inputs.formId
    - name: watchId
      in: path
      value: $steps.listCurrentWatches.outputs.existingWatchId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      watchId: $response.body#/id
      expireTime: $response.body#/expireTime
      state: $response.body#/state
      errorType: $response.body#/errorType
    onSuccess:
    - name: done
      type: end
  - stepId: createReplacement
    description: >-
      Create a replacement watch against the same Pub/Sub topic when no watch
      survived. The new watch carries a new id.
    operationId: createWatch
    parameters:
    - name: formId
      in: path
      value: $inputs.formId
    requestBody:
      contentType: application/json
      payload:
        watch:
          eventType: $inputs.eventType
          target:
            topic:
              topicName: $inputs.topicName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      watchId: $response.body#/id
      expireTime: $response.body#/expireTime
      state: $response.body#/state
  outputs:
    renewedWatchId: $steps.renewExisting.outputs.watchId
    renewedExpireTime: $steps.renewExisting.outputs.expireTime
    replacementWatchId: $steps.createReplacement.outputs.watchId
    replacementExpireTime: $steps.createReplacement.outputs.expireTime

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-forms-renew-expiring-watch-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.