Get last response to Google Form
function getLastResponse() {
var formResponses = FormApp.getActiveForm().getResponses(); // Gets the last submitted response from Form
Logger.log(formResponses.length); // Counts how many total responses have been submitted
var formResponse = formResponses[formResponses.length-1]; // Gets the last response
var itemResponses = formResponse.getItemResponses(); // Gets the items from the Form
for (var j = 0; j < itemResponses.length; j++) { // Starts a counter and adds the items to the responses
var itemResponse = itemResponses[j];
Logger.log('Last response to the question "%s" was "%s"',
itemResponse.getItem().getTitle(),
itemResponse.getResponse()); // Logs the last response and item
// The "%s" just means for each of the following items, put them in here
}
}