File Stay organized with collections Save and categorize content based on your preferences.
Page Summary
A file within a script project is third-party source code created by developers, which can be server-side JS, HTML, or a configuration file.
Each file has properties including its name, type, source content, last modifying user, creation time, update time, and a set of defined functions.
Files can be of different types, such as server-side Javascript, HTML, or JSON for the project's manifest.
A FunctionSet represents a unique collection of functions within a script file.
A Function object represents a function in a script project with a name and an ordered list of parameter names.
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.
| JSON representation |
|---|
{"name":string,"type":enum ( |
| Fields | |
|---|---|
name |
The name of the file. The file extension is not part of the file name, which can be identified from the type field. |
type |
The type of the file. |
source |
The file content. |
lastModifyUser |
The user who modified the file most recently. The details visible in this object are controlled by the profile visibility settings of the last modifying user. |
createTime |
Creation date timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Last modified date timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
functionSet |
The defined set of functions in the script file, if any. |
FileType
An enumeration of different types of files.
| Enums | |
|---|---|
ENUM_TYPE_UNSPECIFIED | Undetermined file type; never actually used. |
SERVER_JS | An Apps Script server-side code file. |
HTML | A file containing client-side HTML. |
JSON | A file in JSON format. This type is only used for the script project's manifest. The manifest file content must match the structure of a validScriptManifest |
FunctionSet
A set of functions. No duplicates are permitted.
| JSON representation |
|---|
{"values":[{object ( |
| Fields | |
|---|---|
values[] |
A list of functions composing the set. |
Function
Represents a function in a script project.
| JSON representation |
|---|
{"name":string,"parameters":[string]} |
| Fields | |
|---|---|
name |
The function name in the script project. |
parameters[] |
The ordered list of parameter names of the function in the script project. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-14 UTC.