Restore Script of Project?

3,194 views
Skip to first unread message

Merve Görkem

unread,
Dec 14, 2021, 3:32:13 PM12/14/21
to Google Apps Script Community
I have no IT background and unfortunately deleted a whole project (on App Script) with valuable code for the whole organisation to manage its members. Did anyone ever experience this and has gotten the script restored by Google? I am desperate for help and would very much appreciate if anyone shares their experience or helps me out in another way. Thanks in advance!


InteGREATer e.V. c/o DSI Deutschlandstiftung Integration gGmbH
Wallstraße 65 | 10179 Berlin
Eingetragen beim Vereinsregister Berlin-Charlottenburg VR 38842 B

Martin Hawksey

unread,
Dec 14, 2021, 3:39:51 PM12/14/21
to Google Apps Script Community
There is one approach shared in this post https://pulse.appsscript.info/p/2020/06/retrieve-previous-versions-of-google-apps-script-projects/

 If you get stuck plenty of consultants in this list that might be able to help 

Alan Wells

unread,
Dec 14, 2021, 3:49:06 PM12/14/21
to Google Apps Script Community
I think that the resource provided by Martin needs the Apps Script project ID. If you don't have that, then that might be a dead end. Unless you recorded the Apps Script project (file) id somewhere, they you probably don't have it.
The first thing to ask is whether you looked in the "Trash" folder. I'm assuming that the file was in a paid Workspace account in your organization? If you permanently deleted the file from the Trash folder, then obviously there is no "built-in" way for you as a user to get the file back. There is an administrator of your organizations Workspace account, so you know who they are? See the follow link about determine who is the administrator:

Merve Görkem

unread,
Dec 14, 2021, 4:05:35 PM12/14/21
to Google Apps Script Community
Thanks for the quick answers - I dont have the project ID because it is fully deleted and not in the trash folder anymore. I have the access to the workspace admin console but I do not know what I can do on there

Alan Wells

unread,
Dec 14, 2021, 4:17:23 PM12/14/21
to Google Apps Script Community
All you can do is contact Google Support.
I don't know what the current policy or capabilities are.
I'm assuming that the company hasn't paid for a file backup service. I have heard of instances in the past where Google support restored a file for a paid account, but again, I don't know what the current situation is.

Merve Görkem

unread,
Dec 14, 2021, 4:23:18 PM12/14/21
to Google Apps Script Community
Alright - I have contacted them and told them which project it is and that the script must be completely restored. I just have to wait for their answer I guess. I really appreciate you helping me out. If there has been scripts restored I will try to stay optimistic

Alan Wells

unread,
Dec 14, 2021, 5:09:07 PM12/14/21
to Google Apps Script Community
I just found some information about how the Admin can restore data.
Open the admin panel
Click on a user.
You'll see an option to Restore Data
Restore Data.png

Merve Görkem

unread,
Dec 14, 2021, 5:24:53 PM12/14/21
to Google Apps Script Community
The problem is that I dont want to restore the data of a user. I need to restore the script for the user/member management system which automatically added members to the organisation - it was like a self service system that the several groups of our volunteering organisation could add new members 

Clay Smith

unread,
Dec 15, 2021, 2:28:03 AM12/15/21
to google-apps-sc...@googlegroups.com
Have you looked in the admin console Audit logs for the deleted project? The document ID will be the script ID. You can filter by owner and title to narrow it down from the activity. 

Clay

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/936cc5b8-9714-4a1e-9c76-bdc9c368569bn%40googlegroups.com.


--


Merve Görkem

unread,
Dec 15, 2021, 5:18:58 AM12/15/21
to Google Apps Script Community
Dear all, thank you  for your help so far. I have the ID for the document now
- what can I do with that?

Merve Görkem

unread,
Dec 16, 2021, 10:24:51 AM12/16/21
to Google Apps Script Community
So unfortunately the deleted script cannot be restored. If it helps anyone of you: always save a backup somewhere else if you code on app script.

Martin Molloy

unread,
Dec 16, 2021, 10:39:48 AM12/16/21
to google-apps-sc...@googlegroups.com
If you can't restore it are you going to try to recreate it?

What do you want it to do?


Martin Molloy


Merve Görkem

unread,
Dec 16, 2021, 10:42:55 AM12/16/21
to Google Apps Script Community
Yes I will try to do a new script with my team of volunteers. We are currently figuring out how we can optimise the whole member management system :)

Alan Wells

unread,
Dec 16, 2021, 11:28:26 AM12/16/21
to Google Apps Script Community
Apps Script files can be manually downloaded as JSON files from Google Drive if you want to keep an offline copy of the code. Right click the file and choose download. The only problem with that is that you need to use the Apps Script API to restore the JSON to an actual Apps Script file. You can also push and pull Apps Script files to online repositories like GitHub. And clasp can be used with a different code editor. The Apps Script API can also be used to copy Apps Script files over other Apps Script files or even copy an individual inner file to another Apps Script file. Unfortunately it's hard to collaborate on the same open Apps Script file with the Google Apps Script online code editor.

Merve Görkem

unread,
Dec 16, 2021, 11:42:33 AM12/16/21
to Google Apps Script Community

Thats good to know! As mentioned I don't have any IT background, but still mostly understand a few things because I had an intro course to coding. However, now that I unfortunately deleted the whole script and talked to Google yesterday I got a better perspective on everything :D anyways I will try to make it right from the beginning. One question: if we start coding offline and want to bring everything on App script afterwards, is there anything we need to keep in mind?

Alan Wells

unread,
Dec 16, 2021, 12:35:43 PM12/16/21
to Google Apps Script Community
The decision about what code editor to use and how to manage your files will be determine by what your priority is. Some people's priority is to use a code editor other than the online Apps Script coded editor. Some people want HTML, CSS and code files stored in separate folders. Some people want to have a formal system of approving code changes, and maintaining multiple versions. Then there's the issue of how easy or hard it is to run your code in order to test it. It's easy to run your Apps Script code when it's bound to a document (Sheet, Doc, Form) Although it's slower to test HTML, CSS and client side Javascript from the online code editor. It's nicer to have a code editor that immediately shows the results of client side code changes. So, there are multiple things to consider.
If you want to code offline then you can use clasp. See:
Unfortunately each option has some weaknesses. I haven't seen good solution for every possible need. I was working on an online code editor that was integrated with the Apps Script API, but stopped working on it and haven't gotten back to it. Plus the only code editor that can run code directly from the code editor is Google's Apps Script editor because Google can integrate the code editor directly with the Google's servers which no one else can do.

Lawrence Sheldon

unread,
Dec 16, 2021, 3:01:55 PM12/16/21
to google-apps-sc...@googlegroups.com
I fully understand that and I'm sure you guys at github could  work that out.

 But my issue is I never was accustomed murderers I never reached out to you guys for your help I didn't even know you're coming existed until my data was stolen out of my drive's installed for huge amounts revenue and then hidden from me using get up employees

Reply all
Reply to author
Forward
0 new messages