"Lagniappe" down in New Orleans where we're from means "a little something extra"! So here's a little something extra:
HOW TO RESET PERMISSIONS:
We expect this app will be used mostly by non-professional developers (like us). With AI doing coding for you, creating Google apps and add-ons is a wide open "field" these days. If you can design it and have some basic knowledge of Google's scripting language, you can build it.
But, when you first jump in to it, the process of creating the apps or add-ons, and getting them through the Google verification process can be frustrating. In particular, Google requires you to make a video and explain a lot of "stuff" including showing how a user will grant permission for the installation of the app or add-on. The Catch-22 is: once you make this video and walk through the various permissions screens, and answer OK, or yes to all of them—how the F' do you ever walk through that process again because once it's done, those "permissions" screens will NEVER appear again (unless you follow our instructions below).
If Google doesn't like your video (which they probably won't if you are a "newbie" to the process), how do you "revert things" in order to trigger the permissions screens again? If you ask AI (ChatGPT, Grok, even Google's own Gemini), you are going to get a lot of bad advice. Here's the easy-peasy skinny. Install the following Google code in your project (in a gs file) and run it manually from the Apps Script interface (the "Run" button) and you're use authorization will be revoked. Next time you try to run your app or Add-on, the permissions screens will appear again. So run this before you make any new video where you need to trigger the permissions screens.
//function to clear Oauth authorizations
function resetAuth() {
ScriptApp.invalidateAuth();
}
HOW TO ENABLE OTHER USERS
Another way to trigger permissions is to share with another user (you, but under a different gmail address than the one you are using the create the app or add-on) the app or add-on code. This approach is also VERY useful in de-bugging your project as a user (rather than as a developer). If you don't understand that, you will once you start digging deep into creating and debugging projects).
So, to do this, from the Apps Script Interface (the graphic below should make it clear what we are talking about)
Click the people icon with the + sign next to it. This is the "share" button. Share the script with your alternate gmail account. Once you do that, the app or add-on's sidebar icon will become visible when you open up a Google Doc™ from that new Google Gmail account. And, that icon will then trigger the permissions screens the first time you click it (and continue to do so until you accept the scopes presented in those screens).
To be clear, you will only be able to trigger the permissions screens once under this new user Gmail, so it's a one-time "fix" insofar as the permissions screens are concerned. Should you want to trigger the permissions screen again, you will need to share with yet another Gmail account you "own" in order to access the permissions screens again. Obviously, the "resetAuth" function is the better way to go for repetitive reset of and access to the permissions workflow. But, this approach is essential as a tool to test the user experience with your code.