So I am trying to use apps scripts to make a function so that I can provide a file url and get the file name in app scripts. Here is the function that I have that keeps giving me a permission error.
function getSSName(url) {
var ss = SpreadsheetApp.openByUrl(name);
return(ss.getActiveSheet().getName());
}
var ss = SpreadsheetApp.openByUrl(name);nameis not defined, it should beurl