Tuesday, October 13, 2026

GOOGLE APPS SCRIPT AUTOMATION | Connect Google Forms, Sheets, and Email — Build a Workflow That Responds Automatically to New Requests



Many digital businesses lose time performing the same

small tasks repeatedly.

A business owner receives a customer enquiry, opens a spreadsheet, checks the submitted information, and sends an email notification to the person responsible for responding. The process is simple, but repeating it for every request creates unnecessary work and opportunities for mistakes.

Automation changes this workflow.

Instead of manually checking for new submissions, you can connect Google Forms, Google Sheets, and Google Apps Script so that a new form response automatically triggers an email notification.

This is a practical example of event-driven automation: an event occurs, a program responds, and a defined task is performed without someone having to initiate it manually each time.

Google Apps Script is a cloud-based JavaScript platform for automating tasks across Google Workspace. It supports event triggers for applications such as Sheets, Forms, Docs, and Calendar, as well as time-driven automation. <Cite refs={["turn906166search0","turn906166search3","turn906166search4"]}/>

In this guide, you will build a small Digital Service Enquiry Automation System that:

  • Collects customer enquiries through Google Forms.
  • Records responses in Google Sheets.
  • Detects new form submissions using an installable trigger.
  • Sends an email alert to the business owner.
  • Provides a practical method for testing and troubleshooting the workflow.

You will use real tools, write a short script, configure an automation trigger, and verify that the system behaves as intended.

The result is a useful foundation for automating enquiries, appointment requests, quotation requests, customer feedback, and other repetitive administrative processes.

1. Understand How the Automation Works

Before building the system, understand the role of each component.

Google Forms collects information from the person submitting the request.

Google Sheets stores the submitted responses in a structured table.

Google Apps Script executes your custom instructions.

An installable form-submit trigger tells Apps Script when to run the function.

Email delivers the notification to the person responsible for responding.

The workflow is:

CUSTOMER SUBMITS FORM → RESPONSE IS RECORDED → TRIGGER RUNS SCRIPT → EMAIL ALERT IS SENT

The important concept is the trigger.

Without a trigger, your function will not automatically run whenever a new response arrives. You would need to run the script manually or initiate it through another mechanism.

Google distinguishes between simple triggers, such as onEdit(e), and installable triggers, which support additional events and can use services requiring authorization. <Cite refs={["turn906166search1","turn906166search0"]}/>

In this project, you will use an installable form-submit trigger attached to the response spreadsheet.

2. Define the Business Problem

Imagine that W3 NOTES DIGITAL offers website development, digital marketing, and other technology services.

Potential customers submit enquiries through a form. Someone must notice each new enquiry and respond promptly.

The initial system will solve one problem: notify the business owner when a new service enquiry is submitted.

It will not automatically quote a price, approve a project, promise a delivery date, or send a marketing campaign.

Those activities require additional business rules and, in some cases, human review.

Define the input

The form will collect:

  • Business name.
  • Contact email.
  • Service requested.
  • Brief description of the requirement.

Define the output

When a customer submits the form:

  1. Google Forms records the response.
  2. Google Sheets stores the response.
  3. Apps Script receives the submission event.
  4. The script prepares an email notification.
  5. The business owner receives the alert.

Define the success condition

The automation is working when a new test submission appears in the response spreadsheet and causes the expected notification to arrive.

A successful script execution alone is not sufficient evidence that the entire workflow is correct. You must verify the response, trigger, and email.

3. Create the Google Form

Open Google Forms:

https://forms.google.com/

Step 1: Start a blank form

Create a new blank form using the current interface.

Give it the title:

Digital Service Enquiry

Add a short description:

Use this form to tell us about the digital service you need. We will review your enquiry and contact you using the details you provide.

Step 2: Add the business name field

Create a short-answer question:

Business name

Make it required.

This field helps you identify the enquiry in the notification email.

Step 3: Add the contact email field

Create a short-answer question:

Contact email

Enable appropriate email validation if the current form controls provide it.

Make the field required if you need a reliable way to contact the person submitting the form.

Remember that validation can check the format of an email address; it cannot prove that the address belongs to the person who entered it.

Step 4: Add the service field

Create a question titled:

Service requested

Use a dropdown or multiple-choice question with options such as:

  • Website development.
  • Digital marketing.
  • Graphic design.
  • Software or app development.
  • Other.

Make the field required if every enquiry must identify a service category.

Step 5: Add a project description

Create a paragraph question titled:

Brief description

Ask the person to describe the problem they want to solve or the service they need.

You can make this field optional if you want people to be able to submit a short enquiry without writing a long explanation.

Step 6: Check the form

Preview the form and submit one test response after connecting it to a spreadsheet in the next section.

Use fictional test details while developing the workflow.

4. Connect Google Forms to Google Sheets

The spreadsheet will hold the response records and provide the location for the automation script.

Step 1: Open the Responses section

In your Google Form, open the Responses tab.

Find the option to link the responses to a spreadsheet.

Step 2: Create a response spreadsheet

Choose the option to create a new spreadsheet.

Use a name such as:

Digital Service Enquiries

Confirm the operation.

Google Forms will create or link a spreadsheet that receives submitted responses. The precise layout of the response controls may change as Google updates the interface.

Step 3: Inspect the response headers

Open the linked spreadsheet.

The first row normally contains column headings corresponding to the form questions, along with a submission timestamp.

For this tutorial, the relevant headings should be:

  • Timestamp
  • Business name
  • Contact email
  • Service requested
  • Brief description

The exact question titles matter because the script will use the corresponding form-response headers to retrieve values.

If you change a question's title, update any script that refers to that title.

Step 4: Submit a test response

Use the form's preview or public response link to submit a fictional enquiry.

Return to the spreadsheet and verify that the new response appears.

Do not proceed until the form-to-spreadsheet connection works.

5. Open Google Apps Script

Now you will add the code that sends an email alert.

Google Apps Script lets you write JavaScript functions that interact with Google Workspace services. A script bound to a spreadsheet can access that spreadsheet and respond to supported events. <Cite refs={["turn906166search3","turn906166search9"]}/>

Step 1: Open the spreadsheet

Open your Digital Service Enquiries response spreadsheet.

Step 2: Open the script editor

From the spreadsheet menu, select:

Extensions → Apps Script

This opens the Apps Script editor associated with the spreadsheet.

If you are using a mobile device and the menu is unavailable or difficult to use, switch to a desktop browser where possible. The editor's full workflow is designed for a desktop development experience.

Step 3: Name the project

Give the project a descriptive name:

Digital Service Enquiry Automation

The script is associated with the spreadsheet, which is useful because the automation depends on its form responses.

Step 4: Understand the default function

A new script project may contain a starter function similar to:

function myFunction() {

}

You will replace the starter code with the notification function in the next section.

6. Write the Notification Script

The script will receive the form-submission event, extract the relevant values, and send a notification to the business owner.

Replace the starter code in the editor with the following:

function notifyNewEnquiry(e) {
  if (!e || !e.namedValues) {
    throw new Error(
      "This function must run from a form-submit event."
    );
  }

  const responses = e.namedValues;

  const getAnswer = (questionTitle) => {
    const values = responses[questionTitle];

    if (!values || values.length === 0) {
      return "Not provided";
    }

    return values.join(", ");
  };

  const businessName = getAnswer("Business name");
  const service = getAnswer("Service requested");
  const contactEmail = getAnswer("Contact email");

  // Replace this with the email address that should
  // receive the notification.
  const recipient = "YOUR_EMAIL@example.com";

  const subject = "New service enquiry: " + businessName;

  const body = [
    "A new digital service enquiry has been submitted.",
    "",
    "Business: " + businessName,
    "Service requested: " + service,
    "Contact email: " + contactEmail,
    "",
    "Open the linked response spreadsheet to review",
    "the complete submission and its timestamp.",
    "",
    "This is an automated notification."
  ].join("\n");

  MailApp.sendEmail({
    to: recipient,
    subject: subject,
    body: body
  });
}

Understand the important parts

The function name

notifyNewEnquiry identifies the function that the trigger will execute.

You will select this exact function when configuring the trigger.

The event object

The parameter e represents information supplied when the trigger runs.

In this example, e.namedValues contains submitted answers associated with the form's question titles. Google documents event objects and form-submit events in its Apps Script trigger references. <Cite refs={["turn906166search4","turn906166search0"]}/>

The answer-retrieval function

getAnswer() retrieves a value by its question title. If a value is absent, it returns Not provided rather than leaving the notification field undefined.

The recipient

Replace:

YOUR_EMAIL@example.com

with the email address that should receive the alert.

Use an address you control or are authorized to configure for this purpose.

The subject

The email subject includes the business name so the owner can recognize the enquiry.

The email body

The message contains a short summary and directs the recipient to the spreadsheet for the full submission.

The email service

MailApp.sendEmail() asks Apps Script to send the notification. This requires the appropriate authorization and remains subject to Google's applicable service quotas and restrictions.

Important: Do not test this function by clicking Run

The function expects an event object supplied by a form-submit trigger.

If you run it directly from the editor, no form event is supplied, and the script will deliberately throw an error.

You will test the function by submitting the form after configuring the trigger.

7. Save the Script and Configure the Trigger

Writing a function does not automatically schedule it to run. You must create the trigger.

Google's official instructions describe how to add an installable trigger through the Apps Script editor. <Cite refs={["turn906166search0","turn906166search5"]}/>

Step 1: Save the project

Save your code in the Apps Script editor.

If prompted, give the project a name and complete the save operation.

Check that the function is named exactly:

notifyNewEnquiry

Step 2: Open Triggers

In the Apps Script editor, locate the Triggers section in the left navigation.

Select the option to add a trigger.

Step 3: Configure the trigger

Set the options as follows:

Setting Value
Function to run notifyNewEnquiry
Deployment Head, if this option is displayed
Event source From spreadsheet
Event type On form submit
Failure notifications Notify me by email, or an appropriate available option

The crucial settings are From spreadsheet and On form submit.

This configuration attaches the trigger to the spreadsheet receiving the form responses.

Google supports form-submit triggers for spreadsheets and forms, but their event objects differ. This script uses the spreadsheet event structure, so configure it as a spreadsheet form-submit trigger rather than a trigger attached directly to the Google Form. <Cite refs={["turn906166search4","turn906166search0"]}/>

Step 4: Save the trigger

Save the configuration.

Google may request permission for the script to access relevant services and send email.

Review the authorization screen and grant the permissions only if you understand and accept what the script will do.

An installable trigger runs using the authorization of the account that created it. This is important when the spreadsheet is shared with other people. <Cite refs={["turn906166search0","turn906166search5"]}/>

Step 5: Confirm that the trigger exists

Return to the Triggers section.

Check that the notifyNewEnquiry trigger appears with the intended event source and event type.

The automation is configured, but you still need to test it end to end.

8. Test the Complete Workflow

Testing verifies whether the system works in practice rather than merely appearing correct in the code editor.

Test A: Submit a new enquiry

Open the Google Form.

Enter fictional details, for example:

Field Test value
Business name Example Business
Contact email customer@example.com
Service requested Website development
Brief description A simple website for a local business

Submit the form.

Test B: Check the spreadsheet

Open the linked response spreadsheet.

Confirm that a new row has appeared with the submitted information.

If no row appears, troubleshoot the form-to-spreadsheet connection before investigating the email script.

Test C: Check the notification inbox

Open the recipient's email account.

Look for a message with a subject similar to:

New service enquiry: Example Business

The message should identify the business, requested service, and contact email.

If the message is not in the inbox, check spam or other filtered folders as well.

Test D: Inspect Apps Script executions

Open the Apps Script editor.

Find the Executions section in the left navigation and inspect the latest run.

Look for the execution of notifyNewEnquiry and check whether it completed successfully or produced an error.

Google notes that failures from installable triggers do not necessarily appear on the screen at the moment they occur. Execution history and failure-notification emails are useful troubleshooting tools. <Cite refs={["turn906166search0","turn906166search5"]}/>

Test E: Submit a second response

Submit another fictional enquiry with different details.

Confirm that a new notification is generated and that the message identifies the new request rather than repeating the earlier test data.

A workflow that succeeds once but fails on subsequent submissions is not ready for regular use.

9. Troubleshoot Common Problems

The spreadsheet receives responses, but no email arrives

Check the following:

  1. Does the trigger exist?
  2. Is the trigger configured for the correct spreadsheet?
  3. Is the event type On form submit?
  4. Is the function name correct?
  5. Did you authorize the script?
  6. Does the execution history show an error?
  7. Is the recipient address correct?
  8. Have the relevant email service quotas been reached?

Also confirm that the trigger belongs to the Google Account you expect to run the automation.

The script says that a form event is missing

This usually happens if the function is run manually from the editor.

The function requires the event object supplied by the form-submit trigger. Test it by submitting the form rather than clicking Run.

The notification says “Not provided”

Check the exact question title in the response spreadsheet and compare it with the strings in the script.

For example, if your form question is Business Name rather than Business name, update the script to use the exact corresponding title.

Capitalization, spacing, and punctuation should be checked carefully.

The trigger is installed, but an execution fails

Open the failed execution and inspect the error details.

Potential causes include authorization problems, incorrect code, service restrictions, or email quotas.

Make the smallest necessary correction, save the project, and submit another test response.

Notifications stop after working previously

Check whether the trigger is still active, whether the account authorization remains valid, and whether failure notifications have arrived.

Inspect the execution history before changing the code. The history can help distinguish a trigger problem from an email-delivery problem.

10. Add a Daily Summary Instead of Individual Alerts

The current system sends an email for each new enquiry. That is useful when every request needs prompt attention, but a high-volume business may prefer a scheduled summary.

Google Apps Script supports time-driven triggers that run at recurring intervals. Their execution time may not occur at the exact minute you select, so do not use them for timing-sensitive guarantees. <Cite refs={["turn906166search0","turn906166search5"]}/>

A daily summary would require a different function that reads the spreadsheet, identifies relevant new submissions, and composes one message.

Before implementing it, decide:

  • Which date or time zone determines a day's records?
  • Which enquiries have already been included in a summary?
  • How will the system avoid repeatedly sending the same records?
  • What should happen if a scheduled run fails?
  • How will the summary handle a large number of requests?

A reliable summary generally needs a way to track which records have already been processed. Simply sending all rows every morning may cause duplicate notifications and unnecessarily expose customer information.

Start with the one-enquiry notification workflow. Add scheduled summaries only when there is a clear business need.

11. Make the Automation Safer and More Reliable

An automated email can save time, but it also creates a new path through which customer information moves.

Before using the system for real enquiries, consider these safeguards.

Limit the information in the notification

The example email includes the business name, service requested, and contact email. It deliberately directs the owner to the response spreadsheet for the full submission.

This reduces the amount of personal or commercially sensitive information copied into email.

If the enquiry includes sensitive material, keep the notification minimal and restrict access to the spreadsheet.

Control spreadsheet access

Give access only to people who need the records to perform their work.

Remember that a trigger created by one account runs under that account's authorization. A shared spreadsheet does not mean every collaborator has the same access or that the automation is owned by the entire team. <Cite refs={["turn906166search0","turn906166search5"]}/>

Avoid duplicate triggers

If multiple triggers call the same notification function for the same event, one submission could produce multiple emails.

Inspect the Triggers section before creating another trigger. Remove obsolete or duplicated triggers when appropriate.

Monitor failures

Enable appropriate failure notifications and review execution history periodically.

A workflow should have a way for its owner to discover when it stops working.

Understand service limits

Apps Script and Gmail-related services have usage quotas and other restrictions. Limits can vary by account type and may change.

Check the current official quota documentation before deploying a workflow that processes many submissions:

https://developers.google.com/apps-script/guides/services/quotas

Do not assume that the email means the business has responded

The notification confirms only that the script attempted to send an alert. It does not mean a staff member has read the message, contacted the customer, or accepted the project.

If the business later needs response tracking, build a separate workflow with explicit statuses such as New, In Progress, and Responded.

12. Understand Where This Automation Can Be Used

Once you understand event-driven automation, you can apply the same approach to other routine business processes.

Business need Possible automation
Website quotation requests Notify the person preparing quotations
Appointment requests Alert the person responsible for scheduling
Customer feedback Send a notification when a new response arrives
Internal task requests Notify a team when a new task is submitted
School enquiries Alert the appropriate admissions contact
Inventory records Trigger a controlled action when stock data changes
Weekly reporting Run a scheduled script to prepare a summary

These are examples of possible workflows, not features automatically provided by the current script.

Each use case needs its own rules, permissions, error handling, and testing.

For example, an appointment notification is not a booking system. A real booking system must check availability, prevent conflicting reservations, and communicate an accurate booking status.

Likewise, an inventory alert should not be treated as proof that stock physically exists. The underlying records must remain accurate.

13. Your Practical Exercise

Use this checklist to complete the project.

  • [ ] Create the Digital Service Enquiry Google Form.
  • [ ] Add the business name, contact email, service, and description questions.
  • [ ] Connect the form to a Google Sheets response spreadsheet.
  • [ ] Submit a test response and confirm that it appears.
  • [ ] Open Apps Script from the spreadsheet.
  • [ ] Add the notifyNewEnquiry function.
  • [ ] Replace the recipient placeholder with your notification address.
  • [ ] Save the script.
  • [ ] Create the spreadsheet's On form submit trigger.
  • [ ] Complete the required authorization.
  • [ ] Submit a second test response.
  • [ ] Verify the email notification.
  • [ ] Inspect the execution history.
  • [ ] Check that no duplicate triggers exist.
  • [ ] Review access permissions before using real customer information.

You have completed the exercise when a new form submission reliably creates a spreadsheet record and triggers the expected email notification.

Final Takeaway

Automation is the practice of turning a repeatable process into a system that performs defined actions when the appropriate conditions occur.

Google Forms provides the input. Google Sheets stores the records. Google Apps Script supplies the logic. A trigger connects the event to the function, and email delivers the notification.

The essential workflow is:

CAPTURE → RECORD → DETECT → PROCESS → NOTIFY → VERIFY

The most useful automation is not necessarily the most complicated one. A small workflow that works reliably, respects customer information, and has a clear way to detect failures can deliver genuine value to a business.

Start with one repetitive task. Define what should happen, automate it, test it under realistic conditions, and expand only when the next improvement solves a real problem.

W3 NOTES BLOG | The Internet Money Feed

Official Resources

  • Google Apps Script: https://developers.google.com/apps-script
  • Apps Script triggers: https://developers.google.com/apps-script/guides/triggers
  • Installable triggers: https://developers.google.com/apps-script/guides/triggers/installable
  • Apps Script event objects: https://developers.google.com/apps-script/guides/triggers/events
  • Extend Google Sheets with Apps Script: https://developers.google.com/apps-script/guides/sheets
  • Apps Script service quotas: https://developers.google.com/apps-script/guides/services/quotas
  • Google Forms: https://forms.google.com/ 

Image: Mete Atamel 

No comments:

Post a Comment