Welcome email on signup
onFormSubmit reads the email column from e.values, builds a subject line, and calls MailApp.sendEmail with a thank-you message and next steps.
The onFormSubmit trigger runs an Apps Script function when a linked Google Form adds a new row to your spreadsheet. It fires after the response lands in the sheet, so your script can route data, send notifications, or stamp IDs without waiting for someone to open the file.
Use onFormSubmit when a form feeds a sheet and you need automatic follow-up: assign owners, email confirmations, copy rows to another tab, or validate answers the moment they arrive.
Skip onFormSubmit if Google Forms email notifications or simple formulas are enough. Do not use it for edits made directly in the grid; use onEdit or an installable edit trigger instead.
Link a Google Form to a spreadsheet so responses create rows on a Responses tab.
Open Extensions > Apps Script and write a handler function, for example processFormSubmit(e).
Add an installable trigger from the Triggers page with event type On form submit.
The event object e includes e.values (array of submitted answers) and e.range (the new row).
Authorize the script the first time it needs MailApp, UrlFetchApp, or other restricted services.
Keep the handler fast and log errors so missed rows are easy to find in Executions.
onFormSubmit reads the email column from e.values, builds a subject line, and calls MailApp.sendEmail with a thank-you message and next steps.
If the answer in column C is Sales, append key fields to a Sales Leads tab and set status Pending in the response row.
Read the last used ID from a Settings tab, increment it, and write the new ticket number into column A of the submitted row.
Build this without starting from a blank cell
Use a Better Sheets tool for onFormSubmit trigger, then watch a walkthrough when you want the full pattern.
Watch how onFormSubmit trigger works
Guides that explain onFormSubmit trigger in more depth.
Google Forms provides basic email notifications for form submissions, but enhancing these notifications with detailed summaries can significantly improve productivity and response management.
Read post →Make your data tasks simpler & efficient. Discover the power of automation in Google Sheets with a comprehensive guide that covers everything from triggers to scripts.
Read post →Ever spent hours crafting the perfect formula in Google Sheets, only to accidentally delete it? It's a frustrating experience that can derail your productivity. Fear not! In this guide, we'll unveil some clever tricks to safeguard your hard work.
Read post →Triggers tell Apps Script when to run a function: on edit, on open, on a schedule, or when a form is submitted. Simple triggers use reserved names like onEdit. Installable triggers are created in the Apps Script Triggers page and can do more, including running as a specific user or on a timer.
Read guide →The onEdit trigger runs a script automatically when someone changes a cell in your spreadsheet. It is one of the simplest ways to make Sheets react to user input without clicking a custom menu. You define the function in Apps Script and bind it to the onEdit event for that file.
Read guide →MailApp is an Apps Script service that sends email from your Google account without opening Gmail. You call MailApp.sendEmail with a recipient, subject, and body, often using cell values as the content. It is the fastest way to notify someone when a row is added or a deadline hits in a tracker.
Read guide →Automation means work happens without repeating the same clicks every day: imports update, emails send, rows move, and dashboards refresh. In Sheets, automation usually stacks built-in features, Apps Script, and sometimes the Sheets API or add-ons. Start with the lightest tool that still solves the job.
Read guide →Done reading about onFormSubmit trigger?
Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.