
Let's build an Opt-in Webform
Copy this Template Google Form

Prepare the Google Form
Rename the file
Open up the script editor
Navigate to Triggers
Add a Trigger

Set the Trigger
Set the defaults as displayed in the image
Hit Save
Select your email account
Select Allow

Back to the code
Once your trigger is set, you may navigate back to the code.