1

I have a google form which my users use to upload files. I record the following

  1. a unique id (input by user)
  2. a category of the document (selected by the user via a dropdown in the form)
  3. The file itself (uploaded by the user)
  4. Google drive link that is recorded into the spreadsheet.

I am unable to find a way to get the actual filename, of the uploaded file.

My requirement

  1. Extract the filename using the drive link as in 4 above using a custom function in the spreadsheet

OR

  1. Any provision by which I can also record the filename of the uploaded file by way of the google form itself.

Any help is highly appreciated.

Chandrajit KC
  • 11
  • 1
  • 5

1 Answers1

0

You can use Apps script triggered by OnFormSubmit or OnChange of the Google Sheets.

Here are some related post: - How to get onFormSubmit to trigger automatically? - How to get form values in the submit event handler?


OR

Use an Apps Script Web App to host your form then control all the submitted details in Apps Script.

Here are some tutorials for this:


Based from my test (OnFormSubmit() and OnChange()), this can be complex as OnFormSubmit() will only get the fileID of the submitted item. You have to do another query to get the name of the uploaded file then save it to your Sheets. While in the Web App, you will be able to get the file name before uploading it thus lesser request needed for this implementation.

Hope this helps.

Mr.Rebot
  • 6,703
  • 2
  • 16
  • 91