I have a spreadsheet with users, from which I automatically create a new spreadsheet (from a template in my drive) when a new user is created.
I then grant the new user permission to look at the spreadsheet and sent it to him via email.
Here's the question:
In the template I have a field that references another spreadsheet via Importrange("spreadsheeturl"). Now everytime a new spreadsheet is created I need to open the sheet with my account and click on "Allow access" in any of the fields that reference the spreadsheet.
Is there anyway to that from my code?