New Bug Encountered:When Appsheet duplicates App, Google Script doesn't copy

I have an app that is 99% ready to deploy. I have asked Appsheet Sales in several requests to find out why when I copy an App, it does not include the GAS that is associated with the Sheet set. I was told that ultimately when I go to reproduce the App when I am selling it, obviously with a Business account, that one of the options is to duplicate each set of sheets for each customer. I am good with that, but am concerned that when the app copies, there is no script with the new set of sheets. The App is no good without the Google Apps Script. Has anyone else experience a similiar issue, or know of the answer. I cannot get Appsheet to answer this. I have spent the better part of two years creating this, and need to move forward.
Thanks in advance!

I’ve been down the same road, but I’m not sure I would consider it a bug.
Even if AppSheet did copy the script, there are lots of reasons the script might not work in the new environment.

  • The new spreadsheet (workbook) has a different ID, so ‘getSheetByID’ would break
  • App folders would have a new ID, so integrations with GDrive would break
  • The script itself would have a new ID, and need to be granted authorization separately from the original script
  • The new app has a different AppId, so API integrations would break
  • Scripts published as web apps would have a different URL and separate approval would be required

Even if you’re careful to reference everything dynamically (‘getActiveSheet’ vs ‘getSheetById’), you still have to approve each script to run separately. So it’s not much more work to copy/paste the script, since you’ll have to open each new copy to approve it.


After trying to write scripts that are as dynamic and re-usable as possible and still having to jump through all these hoops, I’ve moved to using Integromat whenever possible instead of GAS.

Thanks GreenFlux,
I appreciate the help. I do use ‘getActiveSheet’ namely for the reason you suggested. I would be ok with the customer having to grant permissions, as the new sheet would belong to them and operate from their own Gdrive. In essence you are saying that I would have to set up each customer manually by creating a copy of the sheet including the script, duplicating the app without the data and marrying the two together in order for the new customer to be able to run the app with the sheets as the backend.
As far as Integromat, I have never heard of that. I think I will look into that.

Thank you kindly!