Those scripts combine Google Forms, Sheets, Gmail and Admin panel together, to enable user creation automatization. User registers using Forms, the data is passed to Sheets and mail is being sent to the superior (passed in form field). After the supierior confirms the validity of request, the admin is notified via email and can click to approve new user creation request.
The app is written with typescript modules for good ✨developer experience✨
But Google App Script doesn't handle modules, so we need to bundle the app:
npm run build
⚠️ sedis used for postprocessing build file, yeah, I'm a rollup noob
For deployment I've written script in /utils, which uses clasp
cd build
../utils/updateSheets.sh ../utils/sheets.json
What's in the sheets.json? You need to pass id to the compliant Google Sheet document.
Send mail request for template at: patryk.niedzwiedzinski at zhr.pl
The project includes a GitHub Actions workflow to automate deployment upon pushing a new tag (e.g., v1.0.0).
You need to set up the following secrets in your GitHub repository settings:
-
CLASPRS_JSON:- Login to Clasp locally:
npx clasp login - This will create a
~/.clasprc.jsonfile. - Copy the content of this file and paste it as the secret value.
- Login to Clasp locally:
-
ENV_FILE:- Content of your
.envfile (seeexample.env).
- Content of your
-
SCRIPT_ID:- ID of script in script.google.com to deploy to (Sheets > Addons > Apps Script > id in url)