Step-by-Step Guide to Google Forms Email Confirmation Automation

Table of contents

What this automation does

This tutorial builds a simple Google Form that automatically sends:

  1. A confirmation email to the person who submits the form.
  2. A notification email to the form owner.
  3. A response record into a Google Sheet.

The system uses Google Apps Script, Google Forms, Google Sheets, installable triggers, and MailApp. MailApp is designed for sending emails from Apps Script and does not access the user’s Gmail inbox.

Use case

This setup works for:

  • Contact forms
  • Lead forms
  • Quote request forms
  • Booking inquiry forms
  • Support request forms
  • Simple website inquiry forms

It is not designed for high-volume bulk email. Google Apps Script has email quota limits. Google’s quota page lists email recipient limits such as 100 recipients per day for consumer accounts and 1,500 recipients per day for Google Workspace accounts.

Step 1: Create a new Apps Script project

Go to Google Apps Script and create a new project.

Step 2: Paste the script (this one)

Delete the default code and paste the full script above.

Change this line to your own email:

ownerEmail: 'YOUR_EMAIL@gmail.com',

Example:

ownerEmail: 'contact@yourdomain.com',

Also change this to your email name or website name you want to show up in the mail box:

ownerName: 'Your Website Name',

Example:

ownerName: 'ABC Services',

Step 3: Save the project

Click Save.

Name the project something simple, for example:

Google Form Auto Email Sender

Step 4: Run the setup function

In the function dropdown, choose:

setupAutoEmailForm

Click Run.

Google will ask for permission because the script creates a form, creates a spreadsheet, creates a trigger, and sends emails.

Step 5: Authorize the script

Choose your Google account.

Approve the requested permissions.

The script will then create:

  • A Google Form
  • A linked Google Sheet
  • An automatic submit trigger

Installable form-submit triggers run when someone responds to a form.

After the setup function finishes:

  1. Open Executions or Logs.
  2. Find:
Form public URL
  1. Copy that link.
  2. Open it in another browser tab.
  3. Submit a test response.

Step 7: Test the automation

After submitting the form:

  • The submitter should receive an automatic confirmation email.
  • The owner email should receive a notification email.
  • The response should appear in the linked Google Sheet.

Up to this part, the automation set up is already complete, down here are the step by step demonstration of how the script work and how you can customize it.

How the script works

1. It creates the form

const form = FormApp.create(CONFIG.formTitle);

The Forms service allows Apps Script to create, access, and modify Google Forms.

2. It adds fields

The form includes:

NameEmailMessage

The email field uses validation, so users must enter a valid email format.

3. It creates a Google Sheet

const sheet = SpreadsheetApp.create(`${CONFIG.formTitle} Responses`);

The sheet stores form responses automatically.

4. It connects the form to the sheet

form.setDestination(FormApp.DestinationType.SPREADSHEET, sheet.getId());

5. It creates the submit trigger

ScriptApp.newTrigger('sendEmailOnSubmit') .forForm(form) .onFormSubmit() .create();

This tells Apps Script to run sendEmailOnSubmit every time someone submits the form.

6. It sends emails

The script uses:

MailApp.sendEmail()

MailApp.sendEmail() sends emails from Apps Script.

Customization

Change the email subject

Edit (line 5,6):

emailSubjectToSender: 'We received your message',emailSubjectToOwner: 'New Google Form submission'

Example:

emailSubjectToSender: 'Thanks for your inquiry',emailSubjectToOwner: 'New lead from website form'

You can change this as a “thank you” for submission to sender and a “submission” or “lead aquired” to owner.

Change the form questions

Edit this section:

form.addTextItem() .setTitle('Name') .setRequired(true);form.addTextItem() .setTitle('Email') .setRequired(true) .setValidation(emailValidation);form.addParagraphTextItem() .setTitle('Message') .setRequired(true);

Example extra phone field:

form.addTextItem() .setTitle('Phone') .setRequired(false);

This is to input Phone field into the google form and sheet and makes it non-required. You can do the same for other information

Then add this inside sendEmailOnSubmit:

const phone = answers['Phone'] || '';

Important notes

The email is sent from the Google account that authorizes the Apps Script. MailApp sends email but does not access the Gmail inbox.

Google Apps Script has daily email limits, so this setup is suitable for small forms, not mass emailing.

Troubleshooting

The email did not send

Check:

  • The script was authorized.
  • The submit trigger exists.
  • The email address field is named exactly:
Email

The trigger did not work

Run:

setupAutoEmailForm

again.

The script deletes duplicate triggers for sendEmailOnSubmit before creating a new one.

Run:

showLinks

Then check the logs again.

Final result

You now have a fully automated Google Form email sender:

  • User submits a form.
  • User receives a confirmation email.
  • Owner receives a notification email.
  • Response is saved into Google Sheets.

Hope you found this tutorial helpful, if so, please share and comment on this post to let me know.

Thank you for reading !

Leave a Reply

Discover more from Hands Off Automation

Subscribe now to keep reading and get access to the full archive.

Continue reading