Google Forms – Change File Upload Name to Match Form Value

google sheetsgoogle-apps-scriptgoogle-forms

I have a Google Form for contact information. The form asks for Given Name (col A), Family Name (col B) and a File Upload restricted to images only (col D). I have a formula which displays the Full Name [Given Name] [Family Name] in col C.

When the form uploads the image files it keeps their original file name, however, I would like to change each uploaded file name to match the Full Name value in col C.

Couldn't find a way to do it and I suspect it would require a script?

Best Answer

You are right, renaming an uploaded file could be done by using a script and it should be used if you want that file name changes on form submission.

  • You will require to use the Driver Service or the Drive Advanced Service.
  • You could use an onFormSubmit trigger to do this when the response is submitted but you could do the file name change at other time.
    NOTE: There are two onFormSubmit triggers, one for projects bounded to Forms and other projects bounded for Spreadsheets.

Reference