I'm running this within a spreadsheet, ideally to put the values of today's date and then 'value1' into the next available row in the A and B column. It can't be to insert a new row, as I've got other columns set up with formulas to work off this:
function daily() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sh = ss.getSheetByName("Name of Spreadsheet");
var date = Utilities.formatDate(new Date(), "GMT", "YYYY-MM-DD");
sh.appendRow;
sh.getRange("A8").setValue(date);
sh.getRange("B8").setValue('value1');
}
My main question is: how should I configure the sh.getRange("A8") line of code so that it really does:
sh.getRange("Next available A cell").setValue(date);
sh.getRange("Next available B cell").setValue('value1');
Right now I can only get it to write into specific cells, ie. A8, instead of the next row.

