A snippet to automatically add a new row on top daily in Google Sheets
Adds a new row, writes the current date on the first column and sets the text alignment on left. Really effortless way to track daily tasks, for example.


function onTop() {
var ss = SpreadsheetApp.getActiveSheet();
ss.insertRows(3);
var date = Utilities.formatDate(new Date(), "GMT+2", "dd.MM.yyyy")
ss.getRange("A3").setValue(date);

ss.getRange("A3").setHorizontalAlignment("left")
}