Wire up the forms backend
The pre-session survey and the pick-one pledge both submit to a Google Apps Script web app you own, which writes to a Google Sheet you own. The live results page reads back from the same Sheet. You set this up once, paste one URL into a config file, done.
The setup
Create the Google Sheet
Go to sheets.new (signed in as your S2 account). Name the file: AI Studio at S2 — Form Submissions.
Don't add any columns yet. The Apps Script will create the headers automatically on the first submission.
Open the Apps Script editor
From the Sheet, click Extensions → Apps Script. A new tab opens with a code editor showing a default function myFunction().
Delete everything in the editor.
Paste the code
Copy this entire block and paste it into the Apps Script editor:
Click the disk icon (or Cmd+S) to save. Project name doesn't matter.
Deploy as a web app
Click Deploy → New deployment.
- Click the gear icon next to "Select type" and choose Web app.
- Description: "AI Studio forms backend" (or anything).
- Execute as: Me.
- Who has access: Anyone (this allows staff to POST submissions without signing in).
Click Deploy. The first time, Google will ask you to authorize the script. Approve the standard permissions. You may need to click "Advanced" → "Go to (your project)" to get through the unverified-app warning. The script needs access to your spreadsheet — that's expected.
Copy the web app URL
After deploying, Google shows you a Web app URL that looks like:
Copy this URL.
Paste it into the site config
Open ai-studio/assets/config.js in your text editor. Find this line:
Paste your URL between the quotes:
Save the file. Reload the site. Done.
Test it
Open the pre-session survey and submit a test response with your own name. Then open the live results page. Your test response should appear within 10 seconds.
Open your Google Sheet — you should see a new tab called survey with your response as a row.
If you want, delete the test row from the Sheet before the real survey goes out.
Things to know
Updating the script later
If you change the Apps Script code, you need to re-deploy: Deploy → Manage deployments → Edit (pencil icon) → Version: New version → Deploy. The URL stays the same, so you don't have to update config.js again.
Sharing the Sheet with Monica
Click Share on the Sheet and add Monica as an Editor (or Viewer if you don't want her to delete rows). The survey, pledge, and live-poll data each land in their own tab (survey, pledge, poll), created automatically on first use.
Editing or deleting a response
Every submission is one row in its tab, with the name (survey and pledge) shown. To fix a typo, edit the cell. To remove a duplicate or test entry, delete the row. The live results, lobby, and poll screens re-read the Sheet every few seconds, so any change shows up on its own. Live-poll answers are anonymous by design (no name column).
Privacy
The web app accepts submissions from anyone (because the site is password-gated, that's effectively S2 staff). Submissions land in your S2 Google account. No third-party service involved.
Rotating the password
The site password ("AI@S2Training") is in assets/script.js. To rotate it: change the SHARED_PASSWORD constant. The Apps Script URL doesn't need to change.
If submissions stop working
- Open the Apps Script editor and click Executions in the left sidebar. Look for failed runs and their error messages.
- Re-deploy a new version (Deploy → Manage deployments → Edit → New version).
- If Google asks for re-authorization, approve it. It happens occasionally.