How to Send Email Notifications in Google Forms

Want to create a signup for your blog? Or do you need to organize an event for your office and need everyone’s information? With Google Forms you can create an online form in minutes and send it via email or even embed it on your blog post. While creating a form is super easy, sending email notifications to yourself and to the person signing up is a little trickier.

In this post, we’ll breakdown the steps so you can automate the process.

First, create your Google Form. For this post, we’ll use a very simple form.

First, create your Google Form.

Go to the spreadsheet where all the responses are stored. Simply click on “View Responses.” Once you’re in the spreadsheet, click on “Tools” and choose “notification rules” on the drop-down. Remember this notification is going to be sent to your email and not to the user who’s signing up. This step is convenient, as it keeps you from manually checking the activities on your form.

Set  notification rules.

Now you can choose when to send the notification and how often. If the form requires urgent response, I’d recommend choosing “Email – right away.”

Choose when to send the notification and how often.

You may also want to send a confirmation email to the user once he or she submits the form. It can be a short email saying that you’ve received the information. It also assures the user that you’re working on the details submitted.

This part requires a bit of coding. Don’t worry though; it’s super simple! First, on the responses spreadsheet, click “Script editor.”

Click 'Script editor.'

Next, choose Blank Project since you will be using your own code for this specific form.

Choose Blank Project.

Although you have chosen a blank page, there might be preloaded codes. Make sure to delete all of them and start with a clean slate. Now copy and paste this code:

Note: The above code assumes that your first field is “User name”, second field is “user email” and third field is the “Date”. You have to change the value accordingly if your input field order is different.

Do you want to know how these codes were generated? Watch this video from Jeff Everhart. He gives a detailed explanation of how the values are assigned.

Another very important piece of the puzzle: set up the trigger. Once you’re done with the code, it’s time to tell the spreadsheet when to send the confirmation email. Go to “Resources” and choose “Current Project’s Trigger.” You’ll then be routed to this screen:

Tell the spreadsheet when to send the confirmation email.

Choose the options as indicated in the photo. Upon hitting save, you’ll need to authorize to run this code.

Upon hitting save, you'll need to authorize to run this code.

Click on “Continue” to finish setting up the code and the trigger.

Don’t share your Google Form with the public yet. This last step is extremely crucial, so you can fix everything before your form goes live. Go back to your form and click “View live form.” Next, fill out the form and make sure to hit “Submit.”

Test out your form.

Open your Gmail account. In your inbox you should have the confirmation email with the subject “Form Submitted” or whatever subject you’ve written. This was the email that I received when I tested the form and the confirmation code.

You should have the confirmation email.

As you can see, it looks really bare. However, you don’t need fancy codes right away. After testing the code and having it be fully functional, you can then add more HTML codes to the email’s body.

Google Forms is a convenient and extremely useful tool to almost everyone, most especially to huge websites and businesses who are constantly running surveys.

20 comments

    • Hi Jeff, thanks for including the link to the most recent video. :) So far, your video is my favorite, as it is comprehensive and easy to digest.

  1. I just wanted to know if there was a way to program something into the cc line for the confirmation email.

  2. Getting this error

    ‘TypeError: Cannot read property “values” from undefined. (line 2, file “”)
    Dismiss’

    Below code i have use for sending mails

    function myFunction(e){
    var userName = e.values[1];
    var userEmail = e.values[2];
    var date = e.values[3];
    var subject = “Form Submitted”;
    var message = “Thank you,” + userName + “for choosing ” + date;

    MailApp.sendEmail (userEmail, subject, message);
    }

  3. Any ideas on how to automatically send the respondent a copy of their answers? (I’m not confident they will click the “send me a copy of my response button at the bottom of the form)

    Thanks!

    • To send the respondent a copy of their answers, you just have to change the “message” value in the code. Here is the full code:

      function myFunction(e){
      var userName = e.values[1];
      var userEmail = e.values[2];
      var date = e.values[3];
      var subject = "Form Submitted";
      var message = "Thank you. Here is your response:\n\r";
      message += "name: "+userName+"\n\r";
      message += "email: "+userEmail+"\n\r";
      message += "date: "+date;

      MailApp.sendEmail (userEmail, subject, message);
      }

      • Hi,

        How can you include the link to the answers in the mail as well? Now it is published on the page after submission.

        /Fredrik

  4. Hi, is there any way that I can add an email address that a form goes to? At the moment it goes to the one I used to set up my Google account which is OK but I also want to it to go one of my colleagues at the same time. Is there a way to do this? Thanks

  5. When I go to ‘tools’ the only thing that drops down is ‘script editor’ nothing else and I was trying to get to ‘notification rules’ so I can get notification when someone responds to my form. I would be grateful for any help. Thank you.

  6. Google weak points_illegal video, image, hacking email, information data uncomfortable, it has throughly in society all person agreceed to doing bad act. Google remove quickly to it.

  7. function myFunction(e) {

    var email=e.value[2];
    var subject=”Conformation”;
    var message=”Thanks”;
    MailApp.sendEmail(email,subject,message);

    }
    I got this error, when running the program.
    TypeError: Cannot read property “value” from undefined. (line 3, file “Code”)

  8. I keep getting this error when running the script. Any ideas as to how to fix this?

    TypeError: Cannot read property “values” from undefined. (line 2, file “Code”)

    Code used is below:

    function myFunction(e){
    var userName = e.values[1];
    var userEmail = e.values[2];
    var date = e.values[3];
    var subject = “Form Submitted”;
    var message = “Thank you,” + userName + “for choosing ” + date;

    MailApp.sendEmail (userEmail, subject, message);
    }

  9. Hello,
    I get the following error
    TypeError: Cannot read property “values” from undefined. (line 2, file “Code”)

    I have tried all the possible types but not able to resolve please let me know how to resolve this
    Regards,
    Umesh Annegirikar

Comments are closed.

Sponsored Stories