DEV Community

Cover image for From Sheets to Quizzes: Automating Google Forms Like a Pro
Rajesh Singh
Rajesh Singh

Posted on

From Sheets to Quizzes: Automating Google Forms Like a Pro

The Problem: Quizzes are Fun, Making Them is Not

Let’s be real, creating quizzes in Google Forms is fine the first time. But after we’ve clicked that purple “+” button a hundred times, added multiple choice answers manually, and squinted at points for each question, the fun evaporates very soon.

Teachers, trainers, even techies - we all love quizzes. But nobody loves repetitive data entry.

So, why not automate the Google Sheets to do the boring stuff?

The Idea: Sheet In, Quiz Out

The concept is simple:

  • Write the quiz questions in a Google Sheet.
  • Click a shiny new menu option called Form Builder.
  • Watch as a fully published Google Forms Quiz appears - sections, points, correct answers, everything.

So simple, that’s right! ✨

The Stack

This project builds on:

  • Google Sheets (where the questions live)
  • Google Apps Script (the automation brains)
  • Google Forms (the end product: quizzes!)

And of course, it’s all open-source on GitHub: 👉 Google Forms Quiz Builder Repo

The Sheet Format (Where the Magic Begins)

The sheet starts with a few metadata rows:

Key Value Notes
FormTitle Math Assignment 1 Quiz title
FormDescription Maths quiz for beginner Optional
LimitOneResponse FALSE TRUE/FALSE

Then we add a blank row, followed by the question table:

Section Question Type Points AnswerA AnswerB AnswerC AnswerD
Easy Which is larger: 0.3 or 0.25? MCQ 2 0.3 0.25
Easy Explain steps to get 25% as a decimal SA 2
Medium Mark all that equal 2/3. MSQ 3 *2/3 *0.6667 0.65 *0.666...

👉 See the full format guide here: Questions.sheet-format.md

👉 The sample quiz sheet data can be found at sample_questions.csv

Oh, and notice the * before some answers? That’s how you mark the correct ones for MSQs. Sneaky but simple.

The Script

At the heart of this project is a neat Apps Script file (Code.gs).

What it does:

Reads the Sheet data.

  • Creates a Google Form (from the forms template with settings or freshly generated).
  • Adds sections with total points.
  • Supports SA, PARA, MCQ, MSQ question types.
  • Publishes the quiz automatically so students don’t get the dreaded We’re sorry, this document is not published error.

Full code here: src/Code.js

The Output

Run the script and boom 💥 a new Google Form quiz is ready to go:

  • Sections clearly separated with total points.
  • Auto-collected emails.
  • A required “Student Name” field.
  • MCQs and MSQs shuffled for fairness.
  • Linked responses back into the same spreadsheet.

The Demo Video

Why read when you can watch?
I recorded a full walkthrough of the project

Setup in 3 Steps

  • Copy the quiz data into then google Sheet.
  • Open Extensions → Apps Script, paste the code from the repo.
  • Reload the sheet, click Form BuilderCreate Form (Confirm).

For the detailed step-by-step process follow: SETUP.md

Why This Matters

  • For teachers: less manual and smart automation.
  • For devs: a nice Apps Script case study.

🎉 Wrap Up

This was one of those projects where a tiny bit of scripting makes a huge difference.
From “ugh, more manual quiz creation” to “click and done”.

If you liked this, do me a favor:

  • ⭐ Star the repo
  • 📺 Watch the demo
  • 🔗 Share it with someone who still builds Google Forms by hand (and save them some pain!)

Top comments (0)