Sheet columns
Thesetup() function writes the following headers into row 1 of the RSVP_responses sheet. Every form submission maps directly to these column names.
| Column | Field name | Description |
|---|---|---|
| A | Timestamp | Auto-generated UTC+8 timestamp |
| B | name | Guest’s full name |
| C | relation | friends-groom, friends-bride, or other |
| D | attendance | yes or no |
| E | guests | Number of attending guests |
| F | dietary | Meal preference (“, 1 = vegetarian, 2 = fasting) |
| G | vegetarian-meals | Number of vegetarian meals needed |
| H | children-seats | yes or no |
| I | children-seats-count | Number of children’s seats |
| J | invitation | yes or no (paper invitation) |
| K | address | Mailing address for paper invitation |
| L | message | Message to the couple |
| M | email | Guest’s email address |
Setup steps
Create a new Google Sheet
Go to sheets.google.com and create a new spreadsheet.Rename the first sheet tab (at the bottom of the page) to exactly:This matches the constant in the script:
Copy the Sheet ID
Look at the URL in your browser. The Sheet ID is the long alphanumeric string between Copy and save this ID — you will need it in the next step.
/d/ and /edit:Open Apps Script and paste the code
In your spreadsheet, click Extensions → Apps Script.A new tab opens with the Apps Script editor. Delete all existing code in the editor, then paste the entire contents of
google-apps-script.js from your project repository.Update the SHEET_ID variable
Near the top of the script, find and replace the placeholder Sheet ID with the one you copied:For example:
Update the notification email address
In the The script sends two emails on each submission:
sendEmail() function, replace the email address with your own so that you receive RSVP notifications:- A confirmation email to the guest (if they provided their address)
- An admin notification email to this address
Save and run setup()
Press Ctrl+S (or Cmd+S on Mac) to save the script.In the function dropdown at the top of the editor, select
setup, then click Run.You will be prompted to grant permissions — click Review permissions, choose your Google account, and click Allow.The setup() function:- Stores the spreadsheet ID in script properties
- Creates the
RSVP_responsessheet if it does not exist - Writes all 13 column headers with orange formatting
- Freezes the header row
- Sets column widths for readability
- Adds dropdown data validation to key columns
Run
testSetup() after setup() to do a full end-to-end verification. It tests spreadsheet access, sheet access, and sends a sample email with test data so you can confirm the notification format looks correct before going live.Deploy as a web app
Click Deploy → New deployment.In the dialog:
- Click the gear icon next to Select type and choose Web app
- Set Execute as to Me
- Set Who has access to Anyone
- Click Deploy
script.js in the next setup stage.