Google Apps Script magic to create a synchronizable Spreadsheet object
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
lib
.gitignore
README.md
index.js
package.json

README.md

topcap

Using topcap, you can stream the data from your Google Spreadsheet as a Node.js service. By installing a Google Apps Script on your Google Drive, topcap can notify you when a change occurs.

Installing

server

npm install topcap

spreadsheet

To use your own spreadsheet with Topcap do the following:

  1. Make a copy of this spreadsheet File > Make a Copy
  2. Authorize with Authorize > Authorize Application
  3. Next go to to Tools > Script Editor
  4. Choose Publish > Deploy as Web App.
    • Write 'init' or 'first commit' in "Save a New Version"
    • Execute the app: 'me'
    • Who has access to the app: 'Anyone, even anonymous'
    • Press publish
  5. Copy the URL of your script

Usage

var tc = new Topcap({ scriptURL: "YOUR-SCRIPT-URL" }) 

tc.on('data', function(data) {
   if (data["updated"]) {  console.log(data["records"]) } 
})

tc.on('error', function(error) {  console.log(error); })