I have a template sheet that imports several ranges across several hidden data sheets.
Using Google Apps Script, I am planning on regularly making copies of this template:
let template = DriveApp.getFileById(id);
let newTemplate = template.makeCopy();
newTemplate.setName(`${variable} - Doc Name`);
However, as there are several ranges that have been imported (using =IMPORTRANGE) I would need to go in and manually "allow access" to link each sheet to the reference sheet after a duplicate has been made. Is there a way to automate this in Google Apps Scripts WITHOUT opening my sheet up to the general public (anyone who has the link)?