Skip to content

Instantly share code, notes, and snippets.

@joshm21
joshm21 / addFormResponseIdAndUrl.gs
Created April 10, 2020 05:07
On Google Form submission, append the response id and edit response link to the Google Sheet row. Supports rapid form submissions. #google-apps-script #forms
function createFormTrigger() {
var triggerFunctionName = "addFormResponseIdAndUrl_";
deleteAllExistingTriggers_();
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
ScriptApp.newTrigger(triggerFunctionName)
.forSpreadsheet(spreadsheet)
.onFormSubmit()
.create();
}