https://github.com/mooyoul/google-sites-slack-notification
Receive Slack notification when Google Sites has updated.
https://github.com/mooyoul/google-sites-slack-notification
google-sites gsuite serverless
Last synced: about 1 year ago
JSON representation
Receive Slack notification when Google Sites has updated.
- Host: GitHub
- URL: https://github.com/mooyoul/google-sites-slack-notification
- Owner: mooyoul
- License: mit
- Created: 2018-12-31T20:11:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-28T17:28:05.000Z (over 1 year ago)
- Last Synced: 2025-04-13T00:15:48.513Z (about 1 year ago)
- Topics: google-sites, gsuite, serverless
- Language: TypeScript
- Size: 5.26 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 21
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# google-sites-slack-notification
[](http://www.serverless.com)

Receive Slack notification when Google Sites has updated.
This service also supports Service Account, including G Suite domain-wide authority delegation to access private site.
## Limitation
Currently this service only supports **[Classic Google Sites](https://gsuiteupdates.googleblog.com/2016/11/a-totally-rebuilt-google-sitesnow.html)**, since Google Sites Data API does not support [rebuilt Google Site](https://blog.google/products/g-suite/totally-rebuilt-sites-customer-tested/).
See also: [Google Developers - Google Sites API](https://developers.google.com/sites/)
## Configuration
Please refer [src/config.ts](src/config.ts).
## Deploying service
There's two kinds of service deployment type.
### Serverless deployment (Preferred)
> **NOTE**
> - Currently Serverless deployment only supports AWS Lambda environment.
> - Serverless deployment only supports DynamoDB state store.
> - Preconfigured sync interval is 5 minutes. you can change this by editing cron expression on serverless.yml
[Serverless](https://serverless.com/framework/docs/providers/aws/guide/quick-start/) deployment is preferred since this method does not require additional service management.
```bash
$ git clone https://github.com/mooyoul/google-sites-slack-notification
$ cd google-sites-slack-notification
$ vi src/config.ts # Setup target Google site and DynamoDB Store
$ npm run dynamodb:migrate
$ npm run deploy:prod
```
That's it!
### old-fashioned deployment
```bash
$ git clone https://github.com/mooyoul/google-sites-slack-notification
$ cd google-sites-slack-notification
$ vi src/config.ts # Setup target Google site and Store (FileStore or DynamoDB)
$ npm start # Execute sync task to test configuration
```
If sync task was successfully done, add sync task to crontab:
```bash
$ crontab -e
```
and add rule:
```
0/5 * * * * cd PROJECT_ROOT && flock -xn /tmp/.google-sites-sync.lock -c npm start
```
## License
[MIT](LICENSE)
See full license on [mooyoul.mit-license.org](http://mooyoul.mit-license.org/)