Voter Data Infrastructure  ·  Setup

Google Apps Script
Deployment Checklist

Deploy the two form backends that capture Report Order and Custom Request submissions into Google Sheets. Complete both deployments before going live.

0 / 29 complete
01 Prerequisites Have these ready before starting either deployment.
Log in to the Google account that will own the backends
Use the same Google account that owns the response spreadsheets. All Apps Script deployments and their associated sheets should live under one account so access is consistent.
Locate both downloaded .js files
You need: AppsScript_CampaignAssessment.txt, AppsScript_ReportOrderForm.txt, and AppsScript_CustomReportRequest.txt. Both were generated and downloaded from this chat session — check your downloads folder. They are plain text files that open in Notepad or any text editor. If you didn't save them, request them again from the data team.
Locate both HTML form files
You will need to edit ReportOrderForm.html and CustomReportRequest.html once you have deployment URLs. Have them accessible in your text editor or in the project folder.
02 Deploy Campaign Assessment Backend Captures candidate data needs assessments into a Google Sheet.
Create a new Google Sheet for assessment responses
Name it Campaign Assessment — Responses. Open via Extensions → Apps Script to create a bound script.
Paste AppsScript_CampaignAssessment.txt into the script editor
Open the file in Notepad, copy all, paste into the Apps Script editor (replacing the default function). Name the project Campaign Assessment Backend. Save.
Deploy as Web AppExecute as: Me / Anyone
Deploy → New deployment → Web app → Execute as: Me → Who has access: Anyone → Deploy. Authorize when prompted.
Copy and save the deployment URL
Format: https://script.google.com/macros/s/[long-id]/exec. Save it — you will paste it into CampaignAssessment_Final.html.
03 Deploy Report Order Form Backend Captures standard report orders into a Google Sheet.
Create a new Google Sheet for report order responses
Go to sheets.google.com → New spreadsheet. Name it something clear: Report Order Form — Responses. Leave the sheet open — the Apps Script will write headers on first submission.
Open Apps Script from within the new sheet
In the Google Sheet: go to Extensions → Apps Script. This opens the script editor already bound to that spreadsheet — the script can write to it directly. Do not create a standalone script from script.google.com.
Replace default code with AppsScript_ReportOrderForm.js contents
The editor opens with an empty function myFunction() {}. Select all and delete it. Open AppsScript_ReportOrderForm.txt in Notepad, select all, copy, and paste into the Apps Script editor. Name the project Report Order Form Backend. Click Save.
Deploy as Web AppRequired settings below
Click Deploy → New deployment. Set type to Web app. Set Execute as: Me. Set Who has access: Anyone. Click Deploy. When prompted to authorize, click through all permission requests.
Copy and save the deployment URL
After deploying, Apps Script shows a Web App URL. It looks like: https://script.google.com/macros/s/[long-id]/exec. Copy it exactly — you will paste it into the HTML form. Save it somewhere; if you lose it you must redeploy.
04 Deploy Custom Report Request Backend Captures custom voter list requests into a separate Google Sheet.
Create a second new Google Sheet for custom request responses
Name it Custom Report Requests — Responses. Keep this separate from the order form sheet — they have different column structures and different fulfillment workflows.
Open Apps Script from within this second sheet
In the Custom Requests Google Sheet: go to Extensions → Apps Script. Same process — bound script only.
Replace default code with AppsScript_CustomReportRequest.js contents
Select all, delete, open AppsScript_CustomReportRequest.txt in Notepad, copy all contents, paste into the Apps Script editor. Name the project Custom Report Request Backend. Click Save.
Deploy as Web App with same settingsExecute as: Me / Anyone
Deploy → New deployment → Web app → Execute as: Me → Who has access: Anyone → Deploy. Authorize again when prompted — each script requires its own authorization.
Copy and save the second deployment URL
Same format: https://script.google.com/macros/s/[long-id]/exec. This is a different URL from the first one — do not reuse the Report Order Form URL here.
05 Connect URLs to HTML Forms Paste deployment URLs into the form files and redeploy to Cloudflare.
Paste Assessment URL into CampaignAssessment_Final.html
Open the file in Notepad. Find YOUR_APPS_SCRIPT_URL_HERE and replace with the Campaign Assessment deployment URL. Save.
Paste Report Order URL into ReportOrderForm.html
Open ReportOrderForm.html in a text editor. Find the text YOUR_APPS_SCRIPT_URL_HERE (it appears in the form action attribute). Replace it with the Report Order Form deployment URL. Save the file.
Paste Custom Request URL into CustomReportRequest.html
Same process — open CustomReportRequest.html, find YOUR_APPS_SCRIPT_URL_HERE, replace with the Custom Request deployment URL. Save the file.
Re-upload full project folder to Cloudflare Pages
Upload the entire project folder — both updated HTML files go up with the rest. See Cloudflare_Deploy_Instructions.html for the upload process. This is a new deployment on the existing project, not a new project.
06 Test All Three Forms Do not hand off to candidates until both tests pass.
Submit a test entry on the live Campaign Assessment formUse test data
Fill out the full form with test data — at least one item in each section. Submit and confirm the green success message appears.
Confirm test row arrived in the Campaign Assessment Google Sheet
Open the sheet. Confirm bold headers auto-created and the test row appears. Status column should show New. Delete the test row after confirming.
Submit a test entry on the live Report Order FormUse test data
Visit the live Cloudflare URL. Fill out every field with test data. Check at least one report. Submit. Confirm the green success message appears. If it errors, check the deployment URL is correct in the HTML.
Confirm test row arrived in the Report Order Form Google Sheet
Open the sheet. The first submission auto-creates bold headers. The test row should appear in row 2. Confirm the Status column shows New. Delete the test row after confirming.
Submit a test entry on the live Custom Report Request form
Same process — visit the live form, fill every section with test data, submit, confirm success message. Pay special attention to the voter type checkboxes — confirm the sub-level options (High/Med/Low) appear when checked.
Confirm test row arrived in the Custom Request Google Sheet
Open the sheet. Confirm the row arrived with all fields populated. The Status column should show New. This is the column you update manually as requests are fulfilled: New → In Progress → Delivered. Delete the test row after confirming.
07 Maintenance Notes Reference when scripts need updating.
When updating a script — always create a new deploymentDo not edit existing
Editing an existing deployment in Apps Script does not update the live web app URL. Always click Deploy → New deployment for any script changes. You will get a new URL — update it in the HTML and redeploy to Cloudflare.
If form fields change — update the script column headers to match
The script writes headers on the first submission. If form fields are added, removed, or renamed, update the headers array in the script to match, then redeploy. Existing rows in the sheet are not affected.
0 of 29 items complete