Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shubhank-srivastava/google-sheet-watcher-cli
Watches your google sheets for any changes and notifies you via HTTP.
https://github.com/shubhank-srivastava/google-sheet-watcher-cli
cli google-sheets google-spreadsheets notifications watcher
Last synced: 2 months ago
JSON representation
Watches your google sheets for any changes and notifies you via HTTP.
- Host: GitHub
- URL: https://github.com/shubhank-srivastava/google-sheet-watcher-cli
- Owner: shubhank-srivastava
- Created: 2017-03-05T20:06:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-13T19:14:40.000Z (almost 8 years ago)
- Last Synced: 2024-10-08T17:29:38.448Z (4 months ago)
- Topics: cli, google-sheets, google-spreadsheets, notifications, watcher
- Language: JavaScript
- Size: 14.6 KB
- Stars: 9
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# google-sheet-watcher-cli
This is a Node.js application with CLI that enables you to watch for changes to google speadsheets that are either public or privately owned and notifies any HTTP server on a given callback URL.
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes -
### Prerequisites
You would need the following things -
1. [PM2](https://github.com/Unitech/pm2)
```
npm install pm2 -g
```2. Google Service Account Key - Login to [Google Apps Console](https://console.developers.google.com), click on create credentials->service account key. Select a service account and key type as JSON and click on create. After you have downlaoded the JSON file save it as ./data/google-credentials.json
### Installing
```
npm i google-sheet-watcher-cli -g
```## Commands Overview
```
gsheets import
```
Import spreadsheets of auhtorised google user. Remember that all the sheets shared at the email mentioned as client_email field in the generated JSON file are ONLY the private files that will be imported.```
gsheets add
```
Add a Google Spreadsheet (should be public or privately visible to client_email field in the downloaded JSON file.)
```
gsheets list
```
List all sheets that have been added/imported.
```
gsheets del
```
Remove a spreadsheet from the list.
```
gsheets watcher start/stop/restart
```
Starts the watcher to look for changes in any of the spreadsheets.
```
gsheets callback
```
Give a callback URL that gets a hit with details if there is change in any spreadsheet.
For Example -
```
POST http://.com/callback
BODY
{
url: 'https://spreadsheets.google.com/feeds/worksheets/1SLRMX0APFh_EVb7Y3ac4PFn3bM2ipnGx7NaxhAVE8Qk/private/full',
id: '1SLRMX0APFh_EVb7Y3ac4PFn3bM2ipnGx7NaxhAVE8Qk',
title: 'Interview candidates',
updated: '2017-03-13T18:51:58.957Z'
}
```