Can my app be notified of file updates on my Googl

2019-03-19 07:07发布

问题:

I'd like my app to be notified whenever files are added, deleted or modified on my Google Drive directory (or subdirectory). Does Google Drive support webhooks o similar mechanisms for 3rd party integration? I couldn't find anything like that in the API docs.

Thanks in advance.

回答1:

We now support push notifications for early access program members. One of our recent blog posts announces this.

Google Drive API Push Notifications We also told developers about an upcoming Push Notifications system at Google IO 2012. Push Notifications will allow you to get near-instant notifications when files are modified in Google Drive. In the past you would typically have had to frequently poll the Drive API to check if files have been modified to obtain similar results, Push notifications makes this super efficient.

Join the early access program here.



回答2:

Google IO 2012 had an announcement about Push Notifications and an Apps Script example from IO is available as a web app Drive Eye



回答3:

You can create a simple Apps Script with a periodic trigger that calls your app using UriFetch.

https://developers.google.com/apps-script/



回答4:

For those looking for something that can update them in email, there's an Google Drive Folder Monitor appscript with instructions that you can read about here: http://www.jellybend.com/2012/12/19/monitor-google-drive-folders-with-google-apps-script/