Git Product home page Git Product logo

google-docs-add-on's Introduction

Getting started

The add-on lives in Google's Script Editor but, in keeping with best practices, this repo is the source of truth, and the script editor will be overwritten with local changes.

Configuring

This process needs to be performed once:

  1. npm install to install all dependencies
  2. Follow the first step here: Node Google Apps Quickstart - "Independent Developer Console Project" is recommended.
  3. Download the JSON oAuth details
  4. ./node_modules/bin/gapps auth <PATH-TO-JSON-OAUTH-FILE> and follow instructions
  5. Edit the generated gapps.config.json file and change the value for path to be src
  6. Create a new apps script here: https://script.google.com
  7. Get the script ID from the URL (everything between the /d/ and /edit - script.google.com/a/google.com/d/SCRIPT_ID_HERE/edit)
  8. ./node_modules/bin/gapps init <SCRIPT_ID>
  9. Create a new WordPress.com App:
  10. Set the redirect URL to be https://script.google.com/macros/d/SCRIPT_ID/usercallback
  11. Make a note of the app client ID and client secret
  12. In the app script, go to File and Project Properties
  13. Select the Script properties tab
  14. Add OauthClientId and set the value to your app
  15. Add OauthClientSecret and set the value to your app

Everything is now setup.

Deploying

npm run deploy

This will use node-google-apps-script to upload the src directory to the add-on's script editor.

Testing

In the script editor choose "Publish" β†’ "Test as add-on…" and then select a document to test with.

That will open a new window with your document. You will then see your project in the Add-ons menu.

google-docs-add-on's People

Contributors

georgeh avatar johngodley avatar jasmussen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.