> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracecat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Forms

> Reference for the Tracecat Google Forms integration: registered actions, required secrets, expected inputs, and example workflow usage.

## Batch update form

Action ID: `tools.google_forms.batch_update_form`

Change the form with a batch of updates.

Reference: [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/batchUpdate](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/batchUpdate)

### Secrets

Optional secrets:

* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_USER_TOKEN`.
* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`; optional values `GOOGLE_API_SUBJECT`.

### Input fields

<ParamField path="form_id" type="string" required>
  Required. The form ID.
</ParamField>

<ParamField path="requests" type="array[object]" required>
  The update requests of this batch. Each Request sets exactly one of the union fields documented at [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/batchUpdate#Request](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/batchUpdate#Request) (updateFormInfo, updateSettings, createItem, moveItem, deleteItem, updateItem).
</ParamField>

<ParamField path="include_form_in_response" type="boolean | null">
  Whether to return an updated version of the model in the response.

  Default: `null`.
</ParamField>

<ParamField path="write_control" type="object | null">
  Provides control over how write requests are executed. Documented fields: requiredRevisionId, targetRevisionId.

  Default: `null`.
</ParamField>

## Create form

Action ID: `tools.google_forms.create_form`

Create a new form using the title given in the provided form message in the request.

Reference: [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/create](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/create)

### Secrets

Optional secrets:

* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_USER_TOKEN`.
* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`; optional values `GOOGLE_API_SUBJECT`.

### Input fields

<ParamField path="title" type="string" required>
  Required. The title of the form which is visible to responders.
</ParamField>

<ParamField path="document_title" type="string | null">
  The title of the document which is visible in Drive. If `title` is empty, `document_title` may appear in its place in the Google Forms UI and be visible to responders. It can be set on create but cannot be modified by a batchUpdate request.

  Default: `null`.
</ParamField>

<ParamField path="unpublished" type="boolean | null">
  Whether the form is unpublished. If set to `true`, the form doesn't accept responses. If set to `false` or unset, the form is published and accepts responses.

  Default: `null`.
</ParamField>

## Create watch

Action ID: `tools.google_forms.create_watch`

Create a new watch. If a watch ID is provided, it must be unused. For each invoking project, the per form limit is one watch per event type. A watch expires seven days after it is created.

Reference: [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.watches/create](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.watches/create)

### Secrets

Optional secrets:

* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_USER_TOKEN`.
* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`; optional values `GOOGLE_API_SUBJECT`.

### Input fields

<ParamField path="event_type" type="string" required>
  Required. Which event type to watch for. `SCHEMA` (the schema, or form contents, changed) or `RESPONSES` (a form response was submitted).
</ParamField>

<ParamField path="form_id" type="string" required>
  Required. ID of the Form to watch.
</ParamField>

<ParamField path="topic_name" type="string" required>
  Required. A fully qualified Pub/Sub topic name to publish the events to. This topic must be owned by the calling project and already exist in Pub/Sub, and it must grant publish privileges to serviceAccount:[forms-notifications@system.gserviceaccount.com](mailto:forms-notifications@system.gserviceaccount.com).
</ParamField>

<ParamField path="watch_id" type="string | null">
  The ID to use for the watch. If specified, the ID must not already be in use. If not specified, an ID is generated. This value should be 4-63 characters, and valid characters are /\[a-z]\[0-9]-/.

  Default: `null`.
</ParamField>

## Delete watch

Action ID: `tools.google_forms.delete_watch`

Delete a watch.

Reference: [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.watches/delete](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.watches/delete)

### Secrets

Optional secrets:

* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_USER_TOKEN`.
* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`; optional values `GOOGLE_API_SUBJECT`.

### Input fields

<ParamField path="form_id" type="string" required>
  Required. The ID of the Form.
</ParamField>

<ParamField path="watch_id" type="string" required>
  Required. The ID of the Watch to delete.
</ParamField>

## Get form

Action ID: `tools.google_forms.get_form`

Get a form.

Reference: [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/get](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/get)

### Secrets

Optional secrets:

* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_USER_TOKEN`.
* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`; optional values `GOOGLE_API_SUBJECT`.

### Input fields

<ParamField path="form_id" type="string" required>
  Required. The form ID.
</ParamField>

## Get response

Action ID: `tools.google_forms.get_response`

Get one response from the form.

Reference: [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.responses/get](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.responses/get)

### Secrets

Optional secrets:

* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_USER_TOKEN`.
* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`; optional values `GOOGLE_API_SUBJECT`.

### Input fields

<ParamField path="form_id" type="string" required>
  Required. The form ID.
</ParamField>

<ParamField path="response_id" type="string" required>
  Required. The response ID within the form.
</ParamField>

## List responses

Action ID: `tools.google_forms.list_responses`

List a form's responses.

Reference: [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.responses/list](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.responses/list)

### Secrets

Optional secrets:

* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_USER_TOKEN`.
* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`; optional values `GOOGLE_API_SUBJECT`.

### Input fields

<ParamField path="form_id" type="string" required>
  Required. ID of the Form whose responses to list.
</ParamField>

<ParamField path="filter" type="string | null">
  Which form responses to return. Currently, the only supported filters are: `timestamp > N` which means to get all form responses submitted after (but not at) timestamp N, and `timestamp >= N` which means to get all form responses submitted at and after timestamp N. For both supported filters, timestamp must be formatted in RFC3339 UTC "Zulu" format.

  Default: `null`.
</ParamField>

<ParamField path="page_size" type="integer | null">
  The maximum number of responses to return. The service may return fewer than this value. If unspecified or zero, at most 5000 responses are returned.

  Default: `null`.
</ParamField>

<ParamField path="page_token" type="string | null">
  A page token returned by a previous list response. If this field is set, the form and the values of the filter must be the same as for the original request.

  Default: `null`.
</ParamField>

## List watches

Action ID: `tools.google_forms.list_watches`

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.

Reference: [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.watches/list](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.watches/list)

### Secrets

Optional secrets:

* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_USER_TOKEN`.
* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`; optional values `GOOGLE_API_SUBJECT`.

### Input fields

<ParamField path="form_id" type="string" required>
  Required. ID of the Form whose watches to list.
</ParamField>

## Renew watch

Action ID: `tools.google_forms.renew_watch`

Renew an existing watch for seven days. The state of the watch after renewal is ACTIVE, and the expireTime is seven days from the renewal.

Reference: [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.watches/renew](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.watches/renew)

### Secrets

Optional secrets:

* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_USER_TOKEN`.
* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`; optional values `GOOGLE_API_SUBJECT`.

### Input fields

<ParamField path="form_id" type="string" required>
  Required. The ID of the Form.
</ParamField>

<ParamField path="watch_id" type="string" required>
  Required. The ID of the Watch to renew.
</ParamField>

## Set publish settings

Action ID: `tools.google_forms.set_publish_settings`

Updates the publish settings of a form.

Reference: [https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/setPublishSettings](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/setPublishSettings)

### Secrets

Optional secrets:

* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_USER_TOKEN`.
* `google_forms_oauth`: OAuth token `GOOGLE_FORMS_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`; optional values `GOOGLE_API_SUBJECT`.

### Input fields

<ParamField path="form_id" type="string" required>
  Required. The ID of the form. You can get the id from `Form.form_id` field.
</ParamField>

<ParamField path="is_accepting_responses" type="boolean" required>
  Required. Whether the form accepts responses. If `is_published` is set to `false`, this field is forced to `false`.
</ParamField>

<ParamField path="is_published" type="boolean" required>
  Required. Whether the form is published and visible to others.
</ParamField>

<ParamField path="update_mask" type="string | null">
  Optional. The `publishSettings` fields to update. This field mask accepts the following values: `publishState` updates or replaces all `publishState` settings; `*` updates or replaces all `publishSettings` fields.

  Default: `null`.
</ParamField>
