I have attached my draft version of a setup script for these projects (including my frequent need to connect to the Blackbaud SKY API), but not being able to script a number of key publishing steps makes it not really worthwhile. This assumes that you already have node installed on your computer to build the project.
- Create a new Google Cloud project in the console.
- Under APIs & Services, configure OAuth Consent. I usually publish with Internal users (no need for Google review). Add the OAuth Scopes listed in the projects
appscripts.json
file to the OAuth Consent. - Enable the Google Workspace Markplace SDK API.
- Enable any other specific APIs required by the add-on (e.g. the Google Drive API).
- Enable billing on the Google Cloud account for this project (not always strictly necessary, but usually a good idea).
- On the project dashboard, make a note of the project number.
- Clone the project's GitHub repo.
git clone https://github.com/groton-school/<project name>.git
- Install dependencies for the project
cd <project-name>
npm install
- Login to clasp and create a Google Apps Script standalone project. (It creates a new, default
appscript.json
that we don't want.)
npx clasp login
npx clasp create --title "<project name>" --type standalone
git checkout appscript.json
- Build the project
npm run build
- Push the built code to the project (overwriting the default
appscript.json
file).
npx clasp push --force
- Open the new project (in your MyDrive, named
<project name>
-- it can be safely moved anywhere, including Shared Drives, since the connection will be by file ID). - In Settings, change the GCP project from the default to the previously noted project number.
- From the Deploy menu, create a New Deployment.
- Make a note of the deployment ID and version number.
- In the Google Cloud console for the project, go APIs & Services > Enabled APIs & Services > Google Workspace Marketplace SDK > App Configuration
- Configure your app to be Private, Individual and Admin install,
a. Under App Integration, choose the appropriate option and enter the previously noted deployment ID (and version number, if required).
b. Enter the OAuth Scopes listed in
appscript.json
- Configure the Store Listing. I usually store the various media files in the
marketplace
directory of the project. - Copy the App URL for distribution.