TL;DR. See the accepted solution below, but in short: you cant do it!
OP frustration: it's infuriating that I could easily get to very clear documentation suggesting that this was still possible, while approaching this from another direction leads to equally clear documentation saying that it's not.
I'm trying to use Google Scripts to get (simple) access to the Sheets API. Tutorials on how to use Scripts from within a Google Sheet work fine for me. But I'd like to have the script run from a Google Site (so I can construct some HTML to display a result to the user). And I'm stuck really early in the process.
In my reading of the google docs, this link: https://developers.google.com/apps-script/guides/menus explains that I need to ...
As I see it, the kebab menu, upper right by the edit window in the Site, is the More menu; and mine looks like the illustration below. No Manage site item. How do I attach a script to the site?
Then, to call the function you write in the script, they say...
Click me, then highlight the text and select Insert > Link.
As with the other issue, when I highlight text (or right-click selected text, or...), I see no menu or other command.
Looking through older documentation, I wonder if this was the strategy for the "classic" Google Sites, but of course we're supposed to use "new" sites since 2021.
I have a feeling that I'm missing something simple, and would be grateful for help!
Juan Pablo Isaza
All I can say is that this documentation is outdated and is already unavailable.
Script support for Google Sites (Sites Service for Apps Script) was already discontinued after the rebuilt version was released back in 2016.
Only the classic Google Sites can have script support. (Which means only those already created before the newer version's release is still supported and all created sites after that will not have any script support)
Even the actual API is limited to the classic Google Sites: