Update Content

Updates the content of the specified script project

15 variables
14 variables

Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • Create and update Google Apps Script projects

Input

This building block consumes 15 input parameters

  = Parameter name
  = Format

scriptId STRING Required

The script project's Drive ID

files[] OBJECT

An individual file within a script project. A file is a third-party source code created by one or more developers. It can be a server-side JS code, HTML, or a configuration file. Each script project can contain multiple files

files[].type ENUMERATION

The type of the file

files[].lastModifyUser OBJECT

A simple user profile resource

files[].lastModifyUser.email STRING

The user's identifying email address

files[].lastModifyUser.name STRING

The user's display name

files[].lastModifyUser.domain STRING

The user's domain

files[].lastModifyUser.photoUrl STRING

The user's photo

files[].source STRING

The file content

files[].createTime ANY

Creation date timestamp. This read-only field is only visible to users who have WRITER permission for the script project

files[].functionSet OBJECT

A set of functions. No duplicates are permitted

files[].functionSet.values[] OBJECT

Represents a function in a script project

files[].updateTime ANY

Last modified date timestamp. This read-only field is only visible to users who have WRITER permission for the script project

files[].name STRING

The name of the file. The file extension is not part of the file name, which can be identified from the type field

scriptId STRING

The script project's Drive ID

Output

This building block provides 14 output parameters

  = Parameter name
  = Format

files[] OBJECT

An individual file within a script project. A file is a third-party source code created by one or more developers. It can be a server-side JS code, HTML, or a configuration file. Each script project can contain multiple files

files[].type ENUMERATION

The type of the file

files[].lastModifyUser OBJECT

A simple user profile resource

files[].lastModifyUser.email STRING

The user's identifying email address

files[].lastModifyUser.name STRING

The user's display name

files[].lastModifyUser.domain STRING

The user's domain

files[].lastModifyUser.photoUrl STRING

The user's photo

files[].source STRING

The file content

files[].createTime ANY

Creation date timestamp. This read-only field is only visible to users who have WRITER permission for the script project

files[].functionSet OBJECT

A set of functions. No duplicates are permitted

files[].functionSet.values[] OBJECT

Represents a function in a script project

files[].updateTime ANY

Last modified date timestamp. This read-only field is only visible to users who have WRITER permission for the script project

files[].name STRING

The name of the file. The file extension is not part of the file name, which can be identified from the type field

scriptId STRING

The script project's Drive ID