Skip to content

Starting point to work with Google Apps Script and Google Sheets

Notifications You must be signed in to change notification settings

luismartinezs/google-scripts-template

Repository files navigation

Template to develop Google Apps Script in Google Sheets

Use this template as a starting point to develop your own Google Apps Scripts applications.

Mainly purposed to work with Google Sheets.

How to use it

  • Create a new Google Sheet
  • Open the attached script (Tools > Script Editor)
  • Copy the script id from the url, and paste it in the file .clasp.json
  • Install clasp globally, and enable Google Apps Script API (follow the instructions in the Clasp docs)
    • Note that it may take some minutes for the Google Apps Script API activation to take effect
  • Push the local files to the remote script: clasp push

CLASP works similar to git.

Push changes to google apps script: clasp push

Pull changes from google apps script: clasp pull

npm run push, push committed changes to git and push any changes (committed or not) to google apps script

Tests

Google Apps Script does not accept imports / exports. Before running the unit tests locally, uncomment any module.exports

Before pushing to the Google Apps Script, comment any module.exports in any files you push

Run unit tests: npm run test

About

Starting point to work with Google Apps Script and Google Sheets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published