Does anyone know "IF" it is possible to use Google Apps Script with a Google form to auto check "IF" a document URL pasted into the form is a "shared" document?

I'm a teacher and I use Google forms to collect student work, but one of the biggest problems I experience is that students regularly submit url's to "unshared" documents for grading. I'd like to reduce/eliminate this by the form checking the entered document url to see if it is 'shared' befor the form is submitted.

Is this possible? If yes, can someone please point me in the right direction?

Here is the form I'm currently using.


1 Answer 1


The answer validation in Google Forms could be done with Google Apps Script after the students submit their responses, i.e. by using onFormSubmit event.

Once the answer was submitted, you could use the Class File to get properties like:

  • Viewers
  • Editors
  • Owner

It's worth to say that in the 2014 summer Google launched Google Classroom to help teachers to manage the assignments of their classes among other tasks.


Validate answers in your form - Docs editors Help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.