var id = newSS.getId(); //where newSS is your new spreadsheet PropertiesService.getScriptProperties().setProperty('id', id);