Script Projects

A script project represents a collection of files and resources in Google Apps Script, sometimes referred to simply as "a script". A script project has one or more script files which can either be code files (having a .gs extension) or HTML files (a .html extension). You can also include JavaScript 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 will teach you how to create a standalone project from Google Drive and how to create a container-bound project for each of the supported containers.

Create a project from Google Drive

  1. Open Google Drive.
  2. At the top left, click New > More > Google Apps Script.

Create a project using the clasp command line tool

clasp is a command line tool that allows you create, pull/push, and deploy Apps Script projects from a terminal.

See the Command Line Interface using clasp guide for more details.

Create a project from Classic Google Sites

New editor

  1. Open a Classic Google Site.
  2. Click More and select Manage Site.
  3. At the left, click Apps Scripts > Add new script.
  4. At the top left of the script editor, click Untitled project.
  5. Give your project a name and click Rename.

Legacy editor

  1. Open a Classic Google Site.
  2. Click More and select Manage Site.
  3. Click Apps Scripts in the left-hand navigation panel.
  4. Click Add new script.
  5. Select File > Save.
  6. Enter the name of your project and click OK to save the project.

Create a project from Google Sheets

New editor

  1. Open Google Sheets.
  2. Select Extensions > Apps Script.
  3. At the top left of the script editor, click Untitled project.
  4. Give your project a name and click Rename.

Legacy editor

  1. Open Google Sheets.
  2. Select Extensions > Apps Script.
  3. Select File > Save.
  4. Enter the name of your project and click OK to save the project.

Create a project from Google Docs, Slides or Forms

New editor

  1. Open Google Docs, Slides, or Forms.
  2. Select Tools > Script editor.
  3. At the top left of the script editor, click Untitled project.
  4. Give your project a name and click Rename.

Legacy editor

  1. Open Google Docs, Slides, or Forms.
  2. Select Tools > Script editor.
  3. Select File > Save.
  4. Enter the name of your project and click OK to save the project.

Delete a container-bound project

New editor

  1. Open your container-bound project using the appropriate method above.
  2. At the top left, click Overview .
  3. At the top right, click Remove > Delete forever.

Legacy editor

  1. Open your container-bound project using the appropriate method above.
  2. Select File > Delete.
  3. Click Yes to delete the project.

Delete a standalone project

  1. Go to script.google.com.
  2. At the right of the project you want to delete, click More > Remove > Remove.

Manage files in a project

Create a file

New editor

  1. Open your Apps Script project.
  2. At the left, click Editor > Add .
  3. Select the type of file to create and give it a name.

Legacy editor

  1. Select File > New > Script file to create a script file. Select File > New > HTML file to create a HTML file.
  2. Enter the name of the new file and click OK to create it.

Delete a file

New editor

  1. Open your Apps Script project.
  2. At the left, click Editor .
  3. Next to the file you want to delete, click More > Delete.

Legacy editor

  1. Click the arrow next to the file name in the left-hand panel.
  2. Select Delete
  3. Click Yes to delete the file.

Fix issues with multiple Google Accounts

If you're logged into multiple Google Accounts at the same time, you might have trouble accessing your Apps Script projects, add-ons, and web apps. Multi-login, or being logged into multiple Google Accounts at once, isn't supported for Apps Script, add-ons, or web apps.

To fix issues from multi-login, try one of the following solutions:

  • Log out of all your Google Accounts and only log in to the one that has the Apps Script project, add-on, or web app you need to access.
  • Open an incognito window in Google Chrome, or an equivalent private browsing window, and log in to the Google Account that has the Apps Script project, add-on, or web app you need to access.