I am new in appscript and now i want to store the responses filled in the form in a array and then use this array to store the data in a custom format in a spreadsheet, the problem is that i am trying to store and send the response with a manual trigger onFormSubmit, when i submit the form, some information about the sheet i want to modify is logged in console but the data itself can't be retrieved, below is what i am trying, first approach is to get the active form and the second is to catch the response from event, but neither of them are working. how can i accomplish it?
var SPREADSHEET_ID = "SPREADSHEET ID",
SHEET_NAME = "SHEET NAME";
function onFormSubmit(e) {
var sheet = SpreadsheetApp.openById(SPREADSHEET_ID),
form = FormApp.getActiveForm();
var formResponse = e.response;