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>

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

2092238618prefill 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