Hi,
I have a Sheet Add-on app (Editor App) built in AppScript. I intend to make it publicly available in the Workspace Marketplace so I have been researching the process via GCP dashboard and the Marketplace SDK.
One issue has been the lack of resources and documentation available (even youtube videos) on how to best manage the script updating process with Marketplace users who have downloaded the template sheet and associated script. At the moment, if a test user copies the sheet (new sheet ID) the script is copied but becomes ‘stand alone’ with no way to update the script other than via file overwrite.
Can anyone point me to resources I can review to see how the script updating/ upgrading to newer versions is achieved in Marketplace for editor add-ons? Once the app is approved by Google, do these app management tools become available to the app developer? or am I missing something?
Cheers
John
Kindly follow this detailed guide:
- Understanding Google Apps Script Deployment
When you deploy your Google Apps Script as an add-on, it functions within the context of Google Workspace. However, once a user copies a template sheet that contains the script, the script becomes a standalone copy, meaning it doesn’t automatically receive updates from your original code.
- Update Mechanisms
To ensure users can easily update the add-on, consider the following strategies:
a. Versioning Your Script
-
Script Versioning: Use versioning within your Apps Script project to keep track of changes. Whenever you update your script, create a new version by going to: File > Manage Versions, in the Apps Script editor.
-
Deployment of New Versions: After creating a new version, deploy it. You can do this via:
- Test Deployment: For internal testing.
- Production Deployment: For public users once you’re satisfied with the changes.
b. Triggering Updates
You can use triggers to help users update their scripts:
-
Time-driven Triggers: Set up a time-driven trigger that runs a function to check if the current script version matches the latest version on your server or Google Drive. If it does not match, send a notification to users or log a message instructing them to update.
-
On Open Trigger: Use the onOpen() function to check for the latest version each time the sheet is opened. You could display a dialog box prompting users to update if their version is outdated.
-You can research more on this through YouTube Tutorials: While resources might be limited, searching for specific queries related to “Google Apps Script add-on updates” or “Google Workspace Marketplace deployment” can yield helpful results.
Management Tools After Approval
Once your app is approved and listed in the Marketplace:
-
App Management Tools: You will have access to tools for managing and monitoring your add-on. This includes user analytics, feedback, and support for updates. However, the update process for existing users will still rely heavily on the strategies mentioned above.
-
User Notifications: You can set up a mechanism (e.g., using email notifications or in-app alerts) to inform users about new versions or important updates.
Thanks