Services

Start a project
Google Forms

Send an email when a Google Form is submitted.

Someone fills in your form and nothing happens until you notice. This guide shows the free built-in options first, then a short script that sends your own message to the person who submitted it, and alerts you too.

Start here: you may not need a script

Google Forms has two settings that cover the simple cases, and they take a minute:

  • Email yourself: open the form’s Responses tab, click the three dots and choose Get email notifications for new responses.
  • Email the person a copy of their answers: go to Settings → Responses, set Collect email addresses, then set Send responders a copy of their response to When requested or Always.

Use the script below when you want your own wording, such as a booking confirmation, next steps or a link, or when the email should include their answers in a sentence.

Step 1: Link the form to a sheet

In the form’s Responses tab, click Link to Sheets and create a new spreadsheet. Make sure the form has a question for the person’s email. In this guide it’s called Email, and there’s also one called Name.

Each question becomes a column header, and the script uses those exact names.

Step 2: Add the script

In the spreadsheet, open Extensions → Apps Script, delete what’s there and paste this. Change the wording and the NOTIFY address:

const NOTIFY = 'you@example.com'; // gets a copy of each submission

function onFormSubmitEmail(e) {
  const answers = e.namedValues;
  const name = (answers['Name'] && answers['Name'][0]) || 'there';
  const email = answers['Email'] ? answers['Email'][0].trim() : '';

  MailApp.sendEmail({
    to: NOTIFY,
    subject: 'New form response from ' + name,
    body: summarize(answers),
  });

  if (email) {
    MailApp.sendEmail({
      to: email,
      subject: 'Thanks, we got your request',
      body: 'Hi ' + name + ',\n\n' +
            'Thanks for reaching out. We will reply within one business day.\n\n' +
            'Your answers:\n' + summarize(answers),
      replyTo: NOTIFY,
    });
  }
}

function summarize(answers) {
  return Object.keys(answers)
    .map(function (question) {
      return question + ': ' + answers[question].join(', ');
    })
    .join('\n');
}

Step 3: Add the trigger

  1. In Apps Script, click the clock icon (Triggers) and then Add Trigger.
  2. Choose the function onFormSubmitEmail, the event source From spreadsheet and the event type On form submit.
  3. Click Save and approve the permissions Google asks for. It may warn that the app isn’t verified. That’s normal for your own script: choose Advanced and continue.

Step 4: Test it

Submit your own form using an email address you can check. Don’t click Run in the editor to test it: a manual run has no form answers, so it stops with an error. If nothing arrives, open Executions in Apps Script to see the message.

Common problems

What you seeLikely cause
The person gets no emailThe question isn’t named exactly Email. Capitals and spaces count. If you use Google’s built-in email collection, the column is called Email Address, so change the name in the script.
The name says “there”No question is named exactly Name.
Two emails per submissionYou added the trigger twice. Delete one on the Triggers page.
A “too many times” errorA personal Google account can email 100 recipients a day from scripts.

What this doesn’t do

  • It doesn’t check the address is real, so a typo in a normal-looking address means a bounced email in your inbox. If the answer isn’t an email address at all, the send fails and you’ll see the error under Executions, but you still get your own alert because it is sent first.
  • The email comes from the Google account that created the trigger, which is why the script sets a reply-to address.

Want more than a thank-you email?

I build Apps Script automations for small businesses: emails that depend on the answers, PDFs from a template, responses sorted into the right tab, and reminders on a schedule. You get clean code in your own account and a short how-to.