AppsScriptPulse

Send data to a Google Form via Apps Script

Use Google Apps Script to create a prefilled URL of data that can be submitted to a Google Form.

Screenshot of Google Form questions

Screenshot of Google Form questions

The following Google Apps Script is designed to submit specific data to a Google Form, by creating a prefilled URL. The reason for this was I needed some way of sending data from a number of individual Google Sheets (that I did not own) to one central location, but crucially it needed to be anonymised.

Sending the data directly to a Google Sheet includes version history both in the file and cell meaning it was not truly anonymous. Whereas sending the data through a Google Form and then on to the Response Sheet did strip away anything identifiable.

The logic behind this code is to create a prefilled URL which contains answers to each of the Forms questions. Use the previous webpage link to learn how to create such a URL first so that you understand each question on a Form has a unique value.

Source: The Gift of Script: Send data to a Google Form via Apps Script

Leave a Reply

Your email address will not be published. Required fields are marked *