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
If this is the first time you've been to
script.google.com, you'll be
redirected to a page that introduces Apps Script and its developer dashboard.
In that case, click + New script to proceed to the script editor.
Alternatively, you can create standalone scripts from Google Drive after a few steps of setup:
- Go to Google Drive and click New > More > Connect more apps.
- When the "Connect apps to Drive" window appears, type "script" into the search box and press Enter.
- Click Connect next to the listing for Google Apps Script.
Now that you've connected the app, you can create a script by selecting New > More > Google Apps Script.
Running a standalone script
After writing a script, 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.