Runs on form submit and copies each response with a timestamp into a "Log" tab.
function onFormSubmit(e) {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const log = ss.getSheetByName('Log') || ss.insertSheet('Log');
log.appendRow([new Date(), ...e.values]);
}Undo: Delete the trigger; the Log tab can be deleted safely.
Reference: Apps Script documentation.
Facts on this page checked December 4, 2026 (Pacific) against the linked official sources.