[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/workflows/docs/reference/stdlib/googleapis/forms/Overview [Back]  [Original]

Google Forms API Connector Overview  |  Workflows  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Google Forms API Connector Overview Stay organized with collections Save and categorize content based on your preferences.

The Workflows connector defines the built-in functions that can be used to access other Google Cloud products within a workflow.

This page provides an overview of the individual connector. There is no need to import or load connector libraries in a workflowconnectors work out of the box when used in a call step.

Google Forms API

Reads and writes Google Forms and responses. To learn more, see the Google Forms API documentation.

Google Forms connector sample

YAML

# This workflow demonstrates how to use the Google Forms connector:
# Create, update, get, and delete a Google Form
# Expected output: "SUCCESS"
- init:
    assign:
      - form_title: "sample-form"
- create_form:
    call: googleapis.forms.v1.forms.create
    args:
      body:
        info:
          title: ${form_title}
    result: create_form_resp
- update_form:
    call: googleapis.forms.v1.forms.batchUpdate
    args:
      formId: ${create_form_resp.formId}
      body:
        requests:
          - updateFormInfo:
              info:
                title: "new-title"
              updateMask: title
- get_form:
    call: googleapis.forms.v1.forms.get
    args:
      formId: ${create_form_resp.formId}
- list_responses:
    call: googleapis.forms.v1.forms.responses.list
    args:
      formId: ${create_form_resp.formId}
      pageSize: 10
- delete_form:
    call: http.delete
    args:
      url: ${"https://www.googleapis.com/drive/v3/files/" + create_form_resp.formId}
      auth:
        type: OAuth2
        scope: https://www.googleapis.com/auth/drive
- the_end:
    return: "SUCCESS"

JSON

[
  {
    "init": {
      "assign": [
        {
          "form_title": "sample-form"
        }
      ]
    }
  },
  {
    "create_form": {
      "call": "googleapis.forms.v1.forms.create",
      "args": {
        "body": {
          "info": {
            "title": "${form_title}"
          }
        }
      },
      "result": "create_form_resp"
    }
  },
  {
    "update_form": {
      "call": "googleapis.forms.v1.forms.batchUpdate",
      "args": {
        "formId": "${create_form_resp.formId}",
        "body": {
          "requests": [
            {
              "updateFormInfo": {
                "info": {
                  "title": "new-title"
                },
                "updateMask": "title"
              }
            }
          ]
        }
      }
    }
  },
  {
    "get_form": {
      "call": "googleapis.forms.v1.forms.get",
      "args": {
        "formId": "${create_form_resp.formId}"
      }
    }
  },
  {
    "list_responses": {
      "call": "googleapis.forms.v1.forms.responses.list",
      "args": {
        "formId": "${create_form_resp.formId}",
        "pageSize": 10
      }
    }
  },
  {
    "delete_form": {
      "call": "http.delete",
      "args": {
        "url": "${\"https://www.googleapis.com/drive/v3/files/\" + create_form_resp.formId}",
        "auth": {
          "type": "OAuth2",
          "scope": "https://www.googleapis.com/auth/drive"
        }
      }
    }
  },
  {
    "the_end": {
      "return": "SUCCESS"
    }
  }
]

Module: googleapis.forms.v1.forms

Functions
batchUpdate Change the form with a batch of updates.
create Create a new form using the title given in the provided form message in the request. Important: Only the form.info.title and form.info.document_title fields are copied to the new form. All other fields including the form description, items and settings are disallowed. To create a new form and add items, you must first call forms.create to create an empty form with a title and (optional) document title, and then call forms.update to add the items.
get Get a form.

Module: googleapis.forms.v1.forms.responses

Functions
get Get one response from the form.
list List a form's responses.

Module: googleapis.forms.v1.forms.watches

Functions
delete Delete a watch.
list Return a list of the watches owned by the invoking project. The maximum number of watches is two: For each invoker, the limit is one for each event type per form.
renew Renew an existing watch for seven days. The state of the watch after renewal is ACTIVE, and the expire_time is seven days from the renewal. Renewing a watch in an error state (e.g. SUSPENDED) succeeds if the error is no longer present, but fail otherwise. After a watch has expired, RenewWatch returns NOT_FOUND.
Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-26 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-26 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page