> ## 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 API

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

## Call API

Action ID: `tools.google_api.call_api`

Instantiate a Google API client and call a Google API method.

Reference: [https://googleapis.github.io/google-api-python-client/docs/dyn/](https://googleapis.github.io/google-api-python-client/docs/dyn/)

### Secrets

Optional secrets:

* `google_oauth`: OAuth token `GOOGLE_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`.

### Input fields

<ParamField path="method_name" type="string" required>
  Google API method name, e.g. `list` or `get`.
</ParamField>

<ParamField path="resource" type="string" required>
  Resource path, e.g. `files` or `spreadsheets.values`.
</ParamField>

<ParamField path="service_name" type="string" required>
  Google API service name, e.g. `drive` or `sheets`.
</ParamField>

<ParamField path="version" type="string" required>
  Google API version, e.g. `v3` or `v4`.
</ParamField>

<ParamField path="params" type="GoogleAPIParams | null">
  Parameters for the Google API method.

  Default: `null`.
</ParamField>

<ParamField path="scopes" type="array[string] | null">
  Service account scopes. Defaults to \["[https://www.googleapis.com/auth/cloud-platform](https://www.googleapis.com/auth/cloud-platform)"].

  Default: `null`.
</ParamField>

<ParamField path="subject" type="string | null">
  Optional service account domain-wide delegation subject.

  Default: `null`.
</ParamField>

## Call paginated API

Action ID: `tools.google_api.call_paginated_api`

Instantiate a Google API client and call a paginated Google API method.

Reference: [https://googleapis.github.io/google-api-python-client/docs/dyn/](https://googleapis.github.io/google-api-python-client/docs/dyn/)

### Secrets

Optional secrets:

* `google_oauth`: OAuth token `GOOGLE_SERVICE_TOKEN`.
* `google_api`: required values `GOOGLE_API_CREDENTIALS`.

### Input fields

<ParamField path="method_name" type="string" required>
  Google API method name, e.g. `list` or `get`.
</ParamField>

<ParamField path="resource" type="string" required>
  Resource path, e.g. `files` or `spreadsheets.values`.
</ParamField>

<ParamField path="service_name" type="string" required>
  Google API service name, e.g. `drive` or `sheets`.
</ParamField>

<ParamField path="version" type="string" required>
  Google API version, e.g. `v3` or `v4`.
</ParamField>

<ParamField path="next_page_token_path" type="string">
  Dot-separated response path for the next page token. Defaults to "nextPageToken".

  Default: `"nextPageToken"`.
</ParamField>

<ParamField path="page_token_param" type="string">
  Request parameter name for the next page token. Defaults to "pageToken".

  Default: `"pageToken"`.
</ParamField>

<ParamField path="params" type="GoogleAPIParams | null">
  Parameters for the Google API method.

  Default: `null`.
</ParamField>

<ParamField path="scopes" type="array[string] | null">
  Service account scopes. Defaults to \["[https://www.googleapis.com/auth/cloud-platform](https://www.googleapis.com/auth/cloud-platform)"].

  Default: `null`.
</ParamField>

<ParamField path="subject" type="string | null">
  Optional service account domain-wide delegation subject.

  Default: `null`.
</ParamField>
