I am building a Google Apps Script application for Google Sheets that I would like to deploy as an add-on in the Google GSuite Marketplace. My application has three components:
An embedded custom menu and set of dialog boxes within Google Sheets that allow one set of app users ("User Group 1") to manipulate spreadsheet data
A web app that provides another set of users ("User Group 2") with mobile device access to different set of functionality that involves spreadsheet data
Template sheets (ideally, hidden from the user) that the app can use to generate additional sheets programmatically as needed.
I would like to deploy all components as part of a single add-on. I'd like components 1 and 2 to be bound to the same spreadsheet. In fact, I'd like someone in "User Group 1" to be able to click a button to get the URL for the web app. This would require the ability to peform functions on the "Publish" menu through Apps Script code.
My reading of the documentation on add-ons makes no mention of the ability to deploy an add on that includes (a) a UI embedded within Google Sheets, (b) an associated web app that operates on the same user spreadsheet, and (c) template (hidden) sheets. Does anyone have any experience with this, or suggestions on how to proceed?
At present, the only solution I see is to deploy two separate apps (components 1 and 2), but then the web app would not be bound to a specific spreadsheet and hence would need to use a different API. As for accessing template sheets, I think it's possible to access an external sheet through a URL, but I do not think it's possible for an add-on to include template sheets.google-apps-scriptgoogle-spreadsheetgoogle-apps-script-addon
Add-ons can create menu items and open dialogs or sidebars. For custom interfaces, the HTML service offers client-side HTML, CSS, and JS with a few limitations: notably, our security sandbox doesn't work with many JS libraries.
A sidebar can display an HTML service user interface inside a Google Docs, Forms, or Sheets editor.
I am not completely sure that I understand your deployment question - however
Both standalone scripts and scripts bound to G Suite applications can be turned into web apps, so long as they meet the requirements below.
I was able to deploy both an add-on and a web app from a single Standalone script
Or you can make a template sheet in the same spreadsheet and use hideSheet()