Handle Multiple Google Form Submissions in One Spreadsheet with a Single Apps Script Trigger

When working with Google Forms + Google Sheets, a common setup is to connect several forms to the same spreadsheet. Each form creates its own response sheet automatically.

This works well at first. But as soon as you want to automate workflows with Google Apps Script, things become messy.

Typical situations:

  • You have multiple forms for different processes (client onboarding, support requests, event registrations, etc.)
  • Each form writes responses into a different sheet of the same spreadsheet
  • You want to trigger different automation logic depending on the form

The issue is that the Form Submit trigger in Google Sheets does not allow you to specify a different function depending on which form submitted the response.

The approach I use is to create one global trigger function that runs whenever a form submission occurs. This function then routes the event to the appropriate handler, based on the sheet that received the response.

A Single Dispatcher Trigger

The e object returned by the trigger provides the context of the event. From it, we can retrieve the range that triggered the execution, then access the sheet, and finally obtain the sheet name using function chaining.

const sheetName = e.range.getSheet().getName();

From there, we can decide which process should handle the submission.

Here is an example which can be easily

function Main_FormDispatcher(e) {

  // Get sheet name to retrieve what form was submitted
  const sheetName = e.range.getSheet().getName();

  Logger.log(`Form response received from sheet: ${sheetName}`);

  // Dispatch event
  if (sheetName === "Client Intake Responses") {
    processClientIntake(e);
  } else if (sheetName === "Bug Report Responses") {
    processBugReport(e);
  } else if (sheetName === "Newsletter Signup Responses") {
    processNewsletterSignup(e);
  } else {
    Logger.log(`Unknown form sheet detected: ${sheetName}`);
  }
}

If you regularly build Google Workspace automations, structuring your scripts around dispatcher functions like this one will save you a lot of time and complexity later.

How to Find a Google Forms Question ID

Working with Google Apps Script and Google Forms often means mapping answers to the right question. For that, you need the question ID, a stable identifier that won’t change if you edit the title.

In this post, we’ll cover two simple ways to grab it: with Apps Script (getItems()) and via DevTools inspection of the live form. These methods are perfect for automation, building prefilled URLs, and keeping your form integrations reliable.

With Apps Script (getItems())

Use FormApp to loop through all items and match on the title. Great when you already know the exact question label.

/**
 * Return the question ID (string) that matches a given title.
 * @param {FormApp.Form} form
 * @param {string} questionTitle
 * @return {string|null}
 */
function retrieveItemId(form, questionTitle) {
  const items = form.getItems();
  for (let i of items) {
    if (i.getTitle().trim() == questionTitle.trim()) {
      return i.getId().toString();
    }
  }
  return null;
}

Why this is useful: you can rename a question in the UI without breaking scripts that rely on the ID later (IDs are stable; titles are not).

DevTools inspection (quick & dirty)

If you only need a question ID once and you have the live Google Form open, you can grab it straight from the page markup.

Steps:

  1. Open the live form (the “view” URL, not the editor).
  2. Right-click → Inspect (Chrome DevTools).
  3. Press Ctrl/Cmd + F and search for the exact question title (e.g., Name).
  4. Look for a parent <div> with attributes like jsmodel and data-params. Inside that blob you’ll typically see both IDs:
    • The first number after the title block is the Apps Script itemId (what FormApp.getItems() returns).
    • Inside a nested array you’ll also see the prefill entry id used in URLs.
<div jsmodel="CP1oW"
     data-params="... [826355120, &quot;Name&quot;, ..., [[2092238618, null, true, ...]] ] ...">
  ...
</div>

826355120 → itemId (returned by item.getId() in Apps Script)

2092238618 → prefill entry id (used as entry.2092238618=... in a prefilled link)

When to use this approach: fast, one-off lookup while you’re building your Apps Script, testing a prefilled URL, or debugging.
Caveat: this relies on the page’s internal structure, which can change. For anything automated or repeatable, prefer Method 1 (FormApp) or Method 3 (Forms API).

Automatically Email Google Form Submissions (Including File Uploads)

Ever wished you could get an instant email when someone submits your Google Form complete with their answers and any files they uploaded? With a few lines of Apps Script, you can!

Let’s break it down

Why Use This Script?

This solution answers a common need: getting notified via email when someone submits a form response. Especially useful when:

  • You’re collecting job applications or portfolios.
  • You want to automate intake notifications.
  • Your form includes file uploads, and you want the file attached in the email.
  1. Access Apps Script from your Google Forms
  2. Insert the snippet
  3. OnFormSubmit(e) trigger