I\'m currently playing around with Google Apps Script and can\'t get the following snippet to work.
I think you should use:
var mySite = 'https://sites.google.com/site/name_of_the_site'; var site = SitesApp.getSiteByUrl(mySite);