I have a google sheet that needs to auto sort by the timestamp whenever a user submits a form response. I found a script that will do this but it only works when I run the script manually. The script is:
function getSpreadSheet(){
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("New");
sheet.sort(1, false);
}