Google Drive File Or Folder Changed Alert
Receive a notification when there are changes in a Google Drive folder. This Google Sheet Script will send an email notification to you or other email addresses when a file in a Google Drive folder has been added, renamed, changed, or modified.
Script email notification when Google Drive folder or file changes do.
What does this Google Sheet Script email notification when Google Drive folder or file changes do.
Sends email to one or more recipients when any changes are made to a and type of file in a given folder. Or a file is added to a folder.
Monitors all types of files for changes in a given folder, i.e. DOCX, JPG, PDF, and Google Docs and Sheets.
Even detects files that have been updated using Google Manage Versions.
The email includes links to the changed files.
Will send notification if a file is renamed.
Logs changed files to the sheet.
Works with Gmail or Google Apps accounts.
What is does NOT do.
Does not work on subfolders. (see comment below)
Does not send notification when a files has been deleted.
Does not work on the "Shared with me" folder.
To get a copy of this Google Sheet and Script CLICK HERE (You need to be logged in to your Google account.) Opens in new window.
(1) Put the recipient(s) email addresses in cell E1. Send email notifications to any email address, or multiple email addresses, comma separate, i.e. Send To "email@example.com,firstname.lastname@example.org"
(2) Edit this line in the script, replace the number with the ID of the folder you want to monitor files for changes. var folderID = '"' + "0BdNrZ36J1xY2cHF6Y0RSQ2ZlZms" + '"' ; (to edit the srcipt, open the sheet, from the top menu, TOOLS / SCRIPT EDITOR)
(3) You need to manually run the script from the script editor and then authorized it to run.
(4) Setup a time-based trigger to run script the next day. (to set trigger, in the script editor, EDIT / CURRENT PROJECT'S TRIGGERS)
You can manually run the script as often as you want for testing, meaning there is no need to wait for the time-based trigger. You need to change the time in the code from 24 hours to 60 seconds, etc. Should match the times-based trigger. And made sure you have the sheet configured with your correct time zone, File / Spreadsheet settings.
Configure a trigger to run the script , once per day, or ever how often you want. Using time trigger.
I would put the sheet/script in a folder named Scripts for example, I would not put it in the same folder that you are monitoring for changes.
Script DOES NOT work on subfolders. It ONLY checks files in the folder ID you specify in the script.
If you need to monitor more then one folder, simply make a copy of this sheet/script and replace the folder ID number.
Be sure to set the time zone on your Google sheet. File / Spreadsheet settings.
Script written by William June 7, 2016.