Script Projects Stay organized with collections Save and categorize content based on your preferences.
Page Summary
A script project in Google Apps Script is a collection of files and resources, including code (.gs) and HTML (.html) files.
You can create both standalone and container-bound script projects from various Google services or using the
claspcommand line tool.Deleting script projects and files is a permanent action with no recovery option.
Project files can be managed within the Apps Script editor, including creating, deleting, and exporting.
The time zone for a project can be set in project settings, although specific functions can override this setting.
Multi-login with multiple Google Accounts can cause issues with accessing Apps Script, add-ons, and web apps.
A script project represents a collection of files and resources inGoogle Apps Script, sometimes referred to simply as "a script". A script projecthas one or more script files which can either be code files (having a.gsextension) or HTML files (a.html extension). You can also includeJavaScript and CSS in HTML files.
The script editor always has one and only one project opened at any given time.You can open multiple projects in multiple browser windows or tabs.
Create and delete projects
This section explains how to create and delete standalone orcontainer-bound Apps Script projects.
Create a standalone project
To create a standalone project from Apps Script:
- Go to
script.google.com. - ClickNew Project.
- In the script editor, clickUntitled project.
- Give your project a name and clickRename.
Create a standalone project from Google Drive
- OpenGoogle Drive.
- ClickNew>More>Google Apps Script.
Create a container-bound project from Google Docs, Sheets, or Slides
- Open a Docs document, a Sheets spreadsheet, or Slides presentation.
- ClickExtensions>Google Apps Script.
- In the script editor, clickUntitled project.
- Give your project a name and clickRename.
Create a container-bound project from Google Forms
- Open a form in Google Forms.
- Click More>Script editor.
- In the script editor, clickUntitled project.
- Give your project a name and clickRename.
Create a standalone project using theclasp command line tool
clasp is a command line tool that allows you create, pull/push, and deploy AppsScript projects from a terminal.
See theCommand Line Interface usingclasp guidefor more details.
Delete a container-bound project
Warning: Once you delete a container-bound Apps Script project, it can't berecovered.- Open your container-bound project using the appropriate method above.
- At the top left, clickOverview.
- At the top right, click Remove >Delete forever.
Delete a standalone project
- Go to
script.google.com. - At the right of the project you want to delete, click More >Remove >Remove.
Manage files in a project
Create a file
- Open your Apps Script project.
- At the left, clickEditor >Add.
- Select the type of file to create and give it a name.
Delete a file
Deleted files can't be recovered.- Open your Apps Script project.
- At the left, clickEditor.
- Next to the file you want to delete, click More >Delete.
Export files out of an Apps Script project
To take code files out of Apps Script, you can either copy and paste the codefrom each file into your preferred text editor or use clasp on the command line.To use clasp, refer todownload ascript project.
Set the time zone for a project
You can set the time zone for an Apps Script project. Functions performed by the script use this time zone.
- Open your Apps Script project.
- At the left, clickProject Settings
.
- In theTime zone section, select the time zone you want to use.
If you want a specific function to use a different time zone than the scriptproject’s, explicitly enter the time zone in your function. For example, in thebelow sample, each function creates a new event in Google Calendar. The firstfunction defaults to the project time zone. The second function specifies thePacific time zone, so the event is scheduled in Pacific time, regardless of theproject’s time zone.
functioncreateEvent(){//Createsaneventinthescriptproject's time zone and logs the IDvarevent=CalendarApp.getDefaultCalendar().createEvent('New test event',newDate('December 20, 2022 17:00:00'),newDate('December 20, 2022 18:00:00'));console.log('Event ID: '+event.getId());}functioncreateEventPacific(){//CreatesaneventwithaspecifiedtimezoneandlogstheeventID.varevent=CalendarApp.getDefaultCalendar().createEvent('New sample event',newDate('December 20, 2022 17:00:00 PDT'),newDate('December 20, 2022 18:00:00 PDT'));console.log('Event ID: '+event.getId());}Fix issues with multiple Google Accounts
If you're logged into multiple Google Accounts at the same time, you mighthave trouble accessing your add-ons and web apps.Multi-login, orbeing logged into multiple Google Accounts at once, isn't supported for AppsScript, add-ons, or web apps.
If you open the Apps Script editor while logged in to more than one account,Google promptsyou to choose the account you want to proceed with.
If you open a web app or add-on and experience multi-login issues, try one ofthe following solutions:
- Log out of all your Google Accounts and only log in to the one that has theadd-on or web app you want to access.
- Open an incognito window in Google Chrome, or an equivalent private browsingwindow, and log in to the Google Account that has the add-on or web app youwant to access.
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-12-11 UTC.