---
canonical_url: "https://docs.composio.dev/toolkits/google_apps_script"
markdown_url: "https://docs.composio.dev/toolkits/google_apps_script.md"
product: "platform"
version: null
last_updated: null
---

# Google Apps Script

Google Apps Script is a cloud-based JavaScript platform for creating, managing, deploying, and executing automations across Google Workspace.

- **Category:** developer tools
- **Auth:** OAUTH2
- **Composio-managed OAuth available?** No
- **Tools:** 16
- **Triggers:** 0
- **Slug:** `GOOGLE_APPS_SCRIPT`
- **Version:** 00000000_00

## Tools

### Create Deployment

**Slug:** `GOOGLE_APPS_SCRIPT_CREATE_DEPLOYMENT`

Create a deployment for an Apps Script project from a version and return its deployment ID, configuration, entry points, and update time.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented fields. |
| `script_id` | string | Yes | Script project Drive ID. Sent in both the request path and the deployment configuration body. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `description` | string | No | Description for the deployment. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the JSON response payload. |
| `version_number` | integer | No | Project version number on which to base the deployment. |
| `manifest_file_name` | string | No | Manifest file name for the deployment. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Project

**Slug:** `GOOGLE_APPS_SCRIPT_CREATE_PROJECT`

Create an empty standalone or container-bound Apps Script project and return its project metadata and script ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `title` | string | No | Title for the new project; Google does not require this field. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented fields. |
| `parent_id` | string | No | Drive ID of a Google Docs, Sheets, Forms, or Slides file to bind the script to; omit for a standalone project. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Version

**Slug:** `GOOGLE_APPS_SCRIPT_CREATE_VERSION`

Create an immutable numbered snapshot from an Apps Script project's current code and return its assigned version metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented fields. |
| `script_id` | string | Yes | Script project Drive ID. Sent in both the request path and the documented Version body field. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `description` | string | No | Description for the new immutable version. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Deployment

**Slug:** `GOOGLE_APPS_SCRIPT_DELETE_DEPLOYMENT`

Permanently undeploy a deployment from an Apps Script project; this does not delete the project or version.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented response fields. |
| `script_id` | string | Yes | Script project Drive ID. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |
| `deployment_id` | string | Yes | Deployment ID to undeploy. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Deployment

**Slug:** `GOOGLE_APPS_SCRIPT_GET_DEPLOYMENT`

Get one Apps Script deployment by project and deployment ID, including its configuration and externally accessible entry points.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented fields. |
| `script_id` | string | Yes | Script project Drive ID. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the JSON response payload. |
| `deployment_id` | string | Yes | Deployment ID to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Project

**Slug:** `GOOGLE_APPS_SCRIPT_GET_PROJECT`

Get metadata for one Apps Script project, including its title, parent, timestamps, creator, and last modifying user.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented response fields. |
| `script_id` | string | Yes | Script project Drive ID to retrieve. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Project Content

**Slug:** `GOOGLE_APPS_SCRIPT_GET_PROJECT_CONTENT`

Get the current HEAD or a numbered version of an Apps Script project's complete file set, including source code and file metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented response fields. |
| `script_id` | string | Yes | Script project Drive ID whose files to retrieve. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |
| `version_number` | integer | No | Project version to retrieve; omit for the current HEAD content. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Project Metrics

**Slug:** `GOOGLE_APPS_SCRIPT_GET_PROJECT_METRICS`

Get weekly or daily execution, failure, and active-user metrics for a script project, optionally restricted to one deployment.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented response fields. |
| `script_id` | string | Yes | Script project Drive ID whose metrics to retrieve. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |
| `deployment_id` | string | No | Only return metrics for this deployment ID. |
| `metrics_granularity` | string ("UNSPECIFIED_GRANULARITY" | "WEEKLY" | "DAILY") | Yes | Time granularity for returned metric intervals; prefer WEEKLY or DAILY. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Version

**Slug:** `GOOGLE_APPS_SCRIPT_GET_VERSION`

Get one immutable version of an Apps Script project by its version number.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented response fields. |
| `script_id` | string | Yes | Script project Drive ID. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |
| `version_number` | integer | Yes | Version number to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Deployments

**Slug:** `GOOGLE_APPS_SCRIPT_LIST_DEPLOYMENTS`

Return one page of deployments for an Apps Script project, including each deployment's configuration and entry points.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `cursor` | string | No | Continuation token returned as next_cursor by a previous call. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented fields. |
| `page_size` | integer | No | Maximum deployments to return on this page; Google defaults to 50 and documents no maximum. |
| `script_id` | string | Yes | Script project Drive ID whose deployments to list. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the JSON response payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Script Processes

**Slug:** `GOOGLE_APPS_SCRIPT_LIST_SCRIPT_PROCESSES`

Return one page of execution processes for a script project, optionally filtered by function, deployment, time, type, status, or connected-user access level.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `cursor` | string | No | Continuation token returned as next_cursor by a previous call. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented fields. |
| `end_time` | string | No | Only return processes completed at or before this RFC 3339 timestamp. |
| `statuses` | array | No | Only return processes with one of these statuses. Values are sent as repeated query parameters. |
| `page_size` | integer | No | Maximum processes to return on this page. Google defaults to 50 and documents no maximum. |
| `script_id` | string | No | Script project Drive ID whose processes to list. Google documents this field as optional. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `start_time` | string | No | Only return processes started at or after this RFC 3339 timestamp. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |
| `deployment_id` | string | No | Only return processes from this deployment ID. |
| `function_name` | string | No | Only return processes for this script function name. |
| `process_types` | array | No | Only return processes with one of these execution types. Values are sent as repeated query parameters. |
| `user_access_levels` | array | No | Only return processes for which the connected user has one of these access levels. Values are sent as repeated query parameters. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List User Processes

**Slug:** `GOOGLE_APPS_SCRIPT_LIST_USER_PROCESSES`

Return one page of Apps Script executions made by or for the connected user, optionally filtered by project, function, deployment, time, type, status, access level, or project name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `cursor` | string | No | Continuation token returned as next_cursor by a previous call. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented response fields. |
| `end_time` | string | No | Only return processes completed at or before this RFC 3339 timestamp. |
| `statuses` | array | No | Only return processes with one of these statuses. |
| `page_size` | integer | No | Maximum processes to return on this page; Google defaults to 50 and documents no maximum. |
| `script_id` | string | No | Only return processes from this script project Drive ID. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `start_time` | string | No | Only return processes started at or after this RFC 3339 timestamp. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |
| `project_name` | string | No | Only return processes whose project name contains this text. |
| `deployment_id` | string | No | Only return processes from this deployment ID. |
| `function_name` | string | No | Only return processes for this script function name. |
| `process_types` | array | No | Only return processes with one of these execution types. |
| `user_access_levels` | array | No | Only return processes for which the connected user has one of these access levels. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Versions

**Slug:** `GOOGLE_APPS_SCRIPT_LIST_VERSIONS`

Return one page of immutable versions for an Apps Script project with their numbers, creation times, and descriptions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `cursor` | string | No | Continuation token returned as next_cursor by a previous call. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented fields. |
| `page_size` | integer | No | Maximum versions to return on this page; Google defaults to 50 and documents no maximum. |
| `script_id` | string | Yes | Script project Drive ID whose versions to list. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Replace Project Content

**Slug:** `GOOGLE_APPS_SCRIPT_REPLACE_PROJECT_CONTENT`

Destructively replace the complete HEAD file set of an Apps Script project. Every existing file omitted from files is permanently deleted, and files must include a JSON manifest named appsscript.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `files` | array | Yes | Complete replacement file set. Existing project files omitted from this list are permanently deleted. Include a file named appsscript with type JSON containing a valid project manifest. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented response fields. |
| `script_id` | string | Yes | Script project Drive ID. Sent in both the request path and the documented Content body. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Run Function

**Slug:** `GOOGLE_APPS_SCRIPT_RUN_FUNCTION`

Run a function in an API Executable deployment. In addition to the base userinfo.email grant, the connection must include every OAuth scope used by the target script; add those target-specific permissions as custom scopes on the auth config. The function can have arbitrary external side effects.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented response fields. |
| `dev_mode` | boolean | No | If true and the caller owns the script, run the latest saved code instead of the deployed version. |
| `parameters` | array | No | Ordered function arguments. Values must be primitives, arrays, or plain objects, not Apps Script service objects. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the response payload. |
| `deployment_id` | string | Yes | API Executable deployment ID, not the script project's Drive ID. |
| `function_name` | string | Yes | Function to execute without parentheses; may use a library-qualified name such as Library.libFunction1. |
| `session_state` | string | No | Deprecated Android add-on session ID retained for complete API coverage. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Deployment

**Slug:** `GOOGLE_APPS_SCRIPT_UPDATE_DEPLOYMENT`

Replace an Apps Script deployment's configuration, such as its version, description, or manifest file name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alt` | string | No | Response format. Only JSON is supported because this action returns a typed JSON response. |
| `fields` | string | No | Google partial-response selector. Omit to return all documented fields. |
| `script_id` | string | Yes | Script project Drive ID. Sent in the request path and as deploymentConfig.scriptId in the request body. |
| `quota_user` | string | No | Opaque quota attribution key, up to 40 characters; do not put personal data here. |
| `description` | string | No | Updated deployment description. |
| `pretty_print` | boolean | No | Whether Google should pretty-print the JSON response payload. |
| `deployment_id` | string | Yes | Deployment ID to update. |
| `version_number` | integer | No | Version number on which the updated deployment is based. |
| `manifest_file_name` | string | No | Updated manifest file name for the deployment. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
