Skip to main content
script to Forms

Import AI generated questions to Google Forms

As someone who frequently conducts surveys to gather insights and feedback from teachers, I found myself facing the tedious task of manually entering survey questions into Google Forms. I knew there had to be a more efficient way, so I turned to ChatGPT for help.

If you give it some parameters, ChatGPT is good at generating survey questions. I decided to see if I could take it one step further and train it to generate questions in a defined format. Once I got ChatGPT to give me the format I wanted, I asked it to name this the “Baslery” format so I could use it for future question generation.

"Baslery" format
“Baslery” format

To use this format in your own ChatGPT account, I have shared my chat so you can continue the conversation and generate your own questions that are pre-formatted for the next step.

With my question format in place, I worked on a script that imports survey questions from a Google Doc into Google Forms.

Script imports questions from Google Docs into Google Forms

The script takes advantage of my pre-formatted questions that I pasted into Google Docs and parses the data so it can be imported into Google Forms.

To use the script, follow these steps:

  1. Use this template to get your own copy of the Google Doc.
  2. Add your own questions to the doc (use my format)
  3. Click the Extensions -> App Scripts menu item.
  4. Click the Run button.
  5. Follow the steps to authorize the app starting with selecting your account.

After the script is run, you can find a link to the new Google Form in the Execution log or just go to Recent in Google Drive.

There are a couple of caveats when using this script:

  1. The script only works for multiple choice questions.
  2. Double-check your questions before running the script to make sure each one is formatted correctly.
  3. Watch out for True/False questions. ChatGPT likes to forget to list “true” and “false” as options.

Happy surveying!