Reputation: 2372
I've exploring possibilities here to dimish the workload for users when first running the sets of script I'd have built into the spreadsheet. One of the functions requires Sheets API and having the user manually enable it would be a killer. I've read through it and couldn't find a clear answer as to the possibility to add this advanced service together via script when the user is first authorizing the script to run...
This is what the user would have to do instead:
Thanks for your input!
Upvotes: 1
Views: 72
Reputation: 201683
Although, unfortunately, from your question, I cannot know your actual situation, in order to achieve your goal, I thought of the following 3 patterns.
In this pattern, Sheets API is directly used.
If the Google Apps Script project (GAS project) is the container-bound script, it adds Sheets API to appsscript.json
of the GAS project using Google Apps Script API.
If the Google Apps Script project (GAS project) is the standalone script, it adds Sheets API to appsscript.json
of the GAS project using Drive API.
By this, Sheets API can be directly used with the GAS project.
In this pattern, Sheets API is directly used. The flow of this pattern is as follows.
I thought that this pattern might be simpler.
In this pattern, Sheets API is indirectly used. The flow of this pattern is as follows.
In this case, Sheets API has already been enabled at the Web Apps side. So, your GAS project of the client side is not required to enable Sheets API.
In this case, also, I think that it is required to check the number of concurrent accesses. Ref
Upvotes: 3