Learn to Magically Send Emails from your Google Form Responses

Max Brawer
6 min readJun 20, 2018

2023 UPDATE: We’ve launched www.sheetswizard.com, home to ready-to-use apps for saving custom themes, integrating to calendar, formatting your data for analysis, and soon a form notifier — check them out and let us know what you think. Custom themes is free for September only! https://workspace.google.com/marketplace/app/custom_sheet_themes/773536777209

I am always looking to get more and more users to tap into the power behind Google Drive for Enterprise AND to learn to code at the same time.

Back in the old days, we used to try to automate business process with VBA + Excel, which is no fun because VBA is a dead language. But here, in Google land, you’ll be learning some JavaScript and telling your friends you can code in no time!

This example came from a friend who wants to send form submissions automatically to specific email addresses and possibly put them in their own doc. Let’s get into what we need to do, step by step:

Step 1: Create an Apps Script File from your Form Response Spreadsheet

Welcome to your blank slate! Time to code.

Step 2: Capture the new data as it comes in with onFormSubmit

In the code.gs editor, rename the default function to onFormSubmit(e).

function onFormSubmit(e) {


You don’t have to name it this, but it will help you remember what it’s for! Next, click the little ‘stopwatc h’ icon to set up a trigger so that this runs automatically. You’ll have to give permissions to install this one:

You’ve now got a function that is prepared to run whenever a user submits a form response. If you’re new to coding, thisIsCalledCamelCase and is the convention for a function name. The (e) in…



Max Brawer

People Tech & Analytics leader @ Level, formerly Twitch, BuzzFeed, Google, Nielsen | Try his apps @ sheetswizard.com