Will it still run?: Script saved in team drive but executed as a user whose account will be deleted

211 views
Skip to first unread message

Jacob

unread,
Jun 13, 2019, 2:55:47 PM6/13/19
to Google Apps Script Community
Hi,

Bear with me here, I'm not much of a coding person. I recently wrote a script that my company uses, and that script has a UI that is an HTML form which is embedded into a company website which guests will go to. I have saved the script on my department's team google drive, but the web app is still executed as me (I don't want the guests to have to give permissions every time they want to fill out the form, nor do I want them to have to have google accounts). When my google account gets deleted after the end of my summer internship, will the app still be able to run? Or does the fact that it's saved in a team google drive not matter?

Below is a picture of the permissions thing that I'm looking at.

Thanks so much to anyone who could help me or point me in the right direction!

-Jacob

Who executes code.PNG


Jasper Duizendstra

unread,
Jun 14, 2019, 2:39:33 AM6/14/19
to google-apps-sc...@googlegroups.com
Hi Jacob,

Interesting question from a technical perspective. From a functional perspective, regardless if it will keep working or not, transfer the script to a dedicated account or to an owner in the organisation that will be there after you leave.

We see lots of orphaned scripts/documents in organisations and it is important that the ownership of a script is clear. Best scenario, find an owner transfer ownership, and document your script.

I will take a look to the technical part, I assume the script will stop working once your account is deleted. IMHO it is more important to find an owner of the functionality and hand over the script.

Kind regards / Met vriendelijke groet,

Jasper Duizendstra


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/e6e33663-e8df-41a4-b991-2dc0e41eba13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Roberts

unread,
Jun 14, 2019, 4:08:57 AM6/14/19
to Google Apps Script Community
The idea of ownership does get complicated when it comes to team/shared drives. I've tended to ignore them in the past because of this.

I just did a quick experiment where I created a script in a shared drive, and I found I was able to deploy it as a web app from both of the accounts that the drive was shared with. This implies that the script is communially owned not just from a GDrive user perspective but also from an Apps Script one. This further implies that the script would still run fine should the original account that was used to create the script be deleted. 

App deployment is one thing specific to owners, and assigned ownership/access another; I'm not sure what the effect on triggers would be if the original creators account was deleted?? Anyone willing to delete an account to find out?

Andrew Roberts

unread,
Jun 14, 2019, 4:13:27 AM6/14/19
to Google Apps Script Community
Although - re-reading Jacob's post - it would be reasonable to expect the web app to stop working if the "run as user" account was deleted.

I encourage clients to create a "functional" account, something like d...@domain.com, which always "owns" the project once I have finished on it. This works quite well.


On Thursday, 13 June 2019 19:55:47 UTC+1, Jacob wrote:

Romain Vialard

unread,
Jun 14, 2019, 5:04:08 AM6/14/19
to Google Apps Script Community
Indeed it will stop working. The fact that the project / code is saved in a Team / Shared Drive doesn't matter.

The script is executed / powered by your Google account. It uses this account quota and permissions. If you delete the account, it will stop working. But the project / code won't be deleted, as it's stored in a Team Drive. So someone else could re-deploy the script using another Google account (but, as Andrew suggested, best to create a dedicated account for that in advance).

Basically you have to differentiate who owns the code / project (the Team Drive) and who executes it (currently you).
Reply all
Reply to author
Forward
0 new messages