- https://developers.google.com/apps-script/guides/clasp
- https://github.com/google/clasp#run
- https://raw.githubusercontent.com/google/clasp/master/docs/run.md
- Get up to speed with Google Clasp - Video
- https://medium.com/@efrem.sternbach/how-i-published-a-google-sheets-add-on-or-wtf-google-483a66833d70
- https://developers.google.com/apps-script/concepts/manifests
- https://developers.google.com/apps-script/manifest
- https://hawksey.info/blog/2017/11/everything-you-always-wanted-to-know-about-google-apps-script-manifest-files-but-were-afraid-to-ask/#gref
- https://medium.com/effilab/how-to-perform-google-add-on-automated-unit-testing-and-publishing-with-circle-ci-part-2-636c7589350e
- https://www.google.com/search?q=clasp+enable+scopes+appsscript.json
To use clasp run
, you need to complete 4 steps:
- Set up a Project ID.
- Create an OAuth Client ID (Other). Download as
creds.json
. clasp login --creds creds.json
with this downloaded file.- Add the following to
appsscript.json
:"executionApi": { "access": "ANYONE" }
% clasp run testIt Running in dev mode. Error: Permission denied. Be sure that you have:
- Added the necessary scopes needed for the API.
- Enabled the Apps Script API.
- Enable required APIs for project.
- Associate your script with a GCP project number (12-digit number): https://script.google.com/home/projects/YOURSCRIPTID/settings
- Enable Apps Script API for your GCP project: https://console.cloud.google.com/marketplace/product/google/script.googleapis.com?q=search&referrer=search&project=YOURPROJECTNAME
- Run the local creds login:
clasp login --no-localhost --creds ../../configs/creds.json
- What is your GCP projectId?
YOURPROJECTNAME
(with -ID if it is appeneded to the name, which is DIFFERENT from the 12-digit number)