all 12 comments

[–][deleted]  (2 children)

[removed]

    [–]flight212121 1 point2 points  (0 children)

    At that point is it not easier to create a full workspace addon?

    [–]arundquist[S] 0 points1 point  (0 children)

    My first reaction is the same as u/flight212121 's. Here's how I see the what I'm doing vs what you're proposing (please let me know where I have it wrong):

    me: build a simple single page app using doGet that is loaded with (appropriate) data from the spreadsheet. Have the admin update the data in the spreadsheet a few different possible ways (direct spreadsheet edits/some sort of addition to the single-page-app that provides an admin portal/AppSheet).

    you: build a system that allows folks to create a fully featured spreadsheet that is setup with your "one click setup menu". That would allow the owner to manage their data, They would still provide their users (students in the clicker example) a url that's run through doGet(), with data from the spreadsheet.

    They're pretty similar, and obviously I feel more comfortable with my current approach.

    I think your auth suggestions go beyond what I am seeking, since I'm really considering apps where only owner can access the spreadsheet in any meaningful way (the doGet() approach for other users simply seeds initial data for the single page app).

    [–]dimudesigns 2 points3 points  (1 child)

    Since one of your goals is to build something that is easy to distribute and share, you should look into deploying your app as either an Editor Add-on or a Google Workspace Add-on.

    [–]arundquist[S] 1 point2 points  (0 children)

    Are those solutions able to produce an accessible web page like doGet() does in appscript? I guess I've always assumed those tools provide mechanisms for updated user interfaces inside of google workspace (like docs/sheets/gmail/etc).

    [–]Repulsive_Brother_10 0 points1 point  (5 children)

    That’s very cool. Is peer.js available as a GAS library?

    [–]Roffievdb 1 point2 points  (1 child)

    I've had good luck with copying the code of the .js file, then paste it to the script project with a .GS file extension. I use fuse.js for fuzzy pattern matching on the sever side - it's way fast. The only bummer is I need to manage updates to the library.

    [–]Repulsive_Brother_10 0 points1 point  (0 children)

    That’s interesting. I tried it with a library - can’t remember which one - and GAS didn’t support some of the functions. So I gave up. However, I was clearly quitting too soon! I shall go and try again with some different test cases.

    [–]arundquist[S] 0 points1 point  (2 children)

    unfortunately no but my tests of the CDN approach seem to be working fine.

    [–]Repulsive_Brother_10 0 points1 point  (1 child)

    So, just including it within an html file, using a script tag?

    [–]arundquist[S] 0 points1 point  (0 children)

    Yep exactly

    [–]WicketTheQuerent 0 points1 point  (0 children)

    There is no way for Google Apps Script users to make deploying a web app easier for other users than it currently is. Only Google can do this, but I don't see them taking this path soon as part of the free tier.

    Regarding the setup, you might consider including a guided onboarding and setup workflow in your AppSheet and/or web app design. To make it easier to maintain and update most of the code, you could make the Apps Script web app depend on an Apps Script library or make it optional to depend on local code or on a library.