Using my own Google Docs addon without publishing it

半腔热情 提交于 2019-12-01 20:35:25

You can publish it privately. This way you can publish it instantly (google doesn't need to review it), it's only visible and install-able by you, and you don't have to pay the developer fee.

In the Chrome Web Store developer Dashboard:

Developer Dashboard

You can add an "Item" to be published as a draft. Then, you can edit the item before publishing it. At the very bottom of the "Edit Item" page, there are 3 settings for visibility options. The last one is "Private"

An Apps Script bound to a Doc runs the onOpen() function without publishing the script as an Add-on, or Deploying the bound script as a web app. Publishing an Add-on, and deploying a web app are two totally different things. But, you don't even need to do either of those. All you need to do, is open the Doc that the Apps Script is bound to, and the onOpen() function will run. Also, you don't need the e argument in onOpen(e). That's for an event parameter.

Something else that's interesting is group based publishing:

Group-Based Publishing in the Chrome Web Store

You can not by pass the payment process i suppose. As earlier comments mentioned; you can pay the developer fee (as i remember it was like a 5 dollars) and publish it as private. So nobody can see and install it. But if you want to use as test you can run the script as test on a document. Select the "Run->Test as add-on..." menu and you have to select a document. After selecting and openning that document you will see very long text on address bar like this:

https://docs.google.com/document/d/your_document_id/edit?addon_dry_run=bla_bla_bla

So just take the

?addon_dry_run=bla_bla_bla

part after the

https://docs.google.com/document/d/your_document_id/edit

and paste to your other documents :) Your add-on menu will work. But i can not guarantee if that works for only your account or a security leak! Use at your own risk.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!