Google Forms Editor add-on quickstart
This quickstart creates a Google Forms Editor add-on that uses triggers to
send an email when a user responds to the form.
Objectives
- Set up the script.
- Run the script.
Prerequisites
To use this sample, you need the following prerequisites:
- A Google Account (Google Workspace accounts might
require administrator approval).
- A web browser with access to the internet.
Set up the script
- Create a Google Forms form at forms.new.
- Click More more_vert
> Script editor.
- Click Untitled project.
- Rename the Apps Script project Forms notifications and click Rename.
- Click Add a file add
> HTML. Name the file
sidebar
.
- Repeat step 5 to create 4 more HTML files named
about
,
authorizationEmail
, creatorNotification
, and respondentNotification
.
When you're done you should have 1 script file and 5 HTML files.
Replace the contents of each file with the following corresponding code, then
click Save
.
Run the script
- Switch back to your form and refresh the page.
- Add a short answer text question to your form. In Untitled question,
enter Email Address. Optionally, you can create other form questions.
- Click add-ons extension
> Form
notifications. It might take several seconds for add-ons
extension to appear.
- In the dialog, click Configure notifications.
- When prompted, authorize the add-on.
- Again, click add-ons extension
> Form notifications
> Configure notifications.
- In the add-on, check the Notify me box and enter your email
address.
- For Send notifications after every, enter 1.
- Click Save.
- To submit a response, click Preview visibility
- Fill out the form and click Submit.
- Check your email for a notification.
Next steps
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-13 UTC.
[null,null,["Last updated 2025-02-13 UTC."],[[["This Google Forms add-on automates email notifications to form creators and/or respondents upon submission."],["Customizable settings allow control over notification frequency, recipient emails, and content."],["The add-on utilizes Google Apps Script triggers to execute functions when the form is opened, installed, or submitted."],["Users configure notification preferences through a sidebar accessible within the Google Form."],["The script manages authorization to access Google services for sending emails and interacting with form data."]]],["This Google Forms add-on automates email notifications upon form submissions. It notifies the form creator when a set number of responses are received and sends a custom message to respondents. Users configure notification frequency, recipient emails, and custom messages via a sidebar. The add-on manages authorization, sends re-authorization requests, and respects email quotas. Key actions include saving settings, managing triggers, handling form submissions, sending notifications, and validating user inputs. The code structure comprises the script (`code.gs`) and the HTML code (`sidebar.html`, `about.html`, `authorizationEmail.html`, `creatorNotification.html`, `respondentNotification.html`).\n"]]