This template provides a framework for creating a Google Docs add-on. It shows the structure needed to define a UI (including menus, a sidebar and dialog) and how to coordinate communication between the UI client and the server where the Doc resides. This template also covers some basic uses of Apps Script with Google Docs, including:
- Reading and writing text to and from a Google Doc
- Getting and modifying basic file information, such as the file title
Note that add-ons that work with Google Docs will usually need to read and manipulate the (sometimes complex) Doc structure.
Finally, note that this template must be added to a container-bound script attached to a Google Doc in order to function. Developed add-ons must go through a publishing process before they can be made available publicly.