Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download (export) an apps script add-on project?

How will I download an apps-script Google Docs add-on project, which was opened from Tools > Script editor of Google Docs.

File > make a copy of the project do not seem to be any use. since it makes online copy itself. Any alternative ways to achieve?

like image 359
Code Guy Avatar asked Jun 12 '16 10:06

Code Guy


People also ask

How do I download a Google script?

You can GET https://script.google.com/feeds/download/export?format=json&id=[fileId] with the same access token you use to authorize other Drive API requests.

How do I share an app script project?

To share a container-bound project, you simply share the parent container file. For example, if you have a script bound to a Google Sheet, you can make someone an editor of the script by making them an editor of the Google Sheet.


2 Answers

Google launched clasp last year, an official tool to import and export apps scripts projects. It works great!

like image 114
Pulpo Avatar answered Oct 11 '22 21:10

Pulpo


You should not develop you add-on directly in a document (I made this mistake too). Instead you need to have an independant script that you bound to a document with the options to test it as an addon (this way).
Doing so you'll have the capacity to export (and import) your script with the Google Drive rest api.To my knowledge there is two tools that you can use:
gapps writen in node python-gas-cli, a python tool (never tested it)

You should also have a look at this post that explain quite well how it work

like image 43
Harold Avatar answered Oct 11 '22 22:10

Harold