Got 5 mins? Help us improve Apps Script documentation by taking a quick online study.

Standalone Scripts

A standalone script is any script that is not bound to a Google Sheets, Docs, Slides, or Forms file or Google Sites. These scripts appear among your files in Google Drive.

Creating a standalone script

The easiest way to create a standalone script is to visit script.google.com and at the top left, click New project.

You can also create standalone scripts from Google Drive. Go to Google Drive and click New > More > Google Apps Script.

Running a standalone script

New editor

To run a function from the script editor, at the top, select the name of the function you want to execute and click Run.

Legacy editor

There are two ways to run a function from the script editor:

  • Select the Run menu, followed by the name of the function you want to execute.
  • Choose the name of the function you want to execute from the select box in the toolbar, then click ▶.

Using a standalone script

Many standalone scripts are utility scripts — for example, to search your Google Drive for old files whose name contains "untitled" so that you can delete them.

A standalone script can also be deployed as a web app or set up to run automatically from an installable trigger.

Finally, it is now possible for add-ons to be published from standalone scripts.