Workflows connector that defines the built-in function used to access Google Forms within a workflow.

## Explore further


For detailed documentation that includes this code sample, see the following:

- [Google Forms API Connector Overview](https://docs.cloud.google.com/workflows/docs/reference/googleapis/forms/Overview)

## Code 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"

## What's next


To search and filter code samples for other Google Cloud products, see the
[Google Cloud sample browser](https://docs.cloud.google.com/docs/samples?product=workflows).