This article covers a method to get email notifications when files are deleted from Google Drive. Google Drive offers 15 GB of free storage to every Google account. When we delete files from Google Drive, those files are moved to the Bin folder where those stays forever until we delete them permanently to reclaim space.
But this Bin folder policy is changing now. Google announced that any files moved to the Bin folder will be deleted automatically after 30-day. So if you delete a file or folder from your Google Drive, you’ll only have a 30-day window to restore it back. If you missed that window then you will lose your file or folder permanently. To avoid accidentally losing your important files due to this here is a way to get notified when files are deleted from your Google Drive so you can restore those back.
Also read: How to Use Google Drive as FTP Server Free
Get Email Notifications for Deleted Drive Files and Folders
This is made possible with an open-source Google Script known as Google Drive Watch. You can add this script to your Google account and then edit to including the email address where you like to get the notifications for deleted files and set the notification interval as well. Here is a step by step process to do the same.
Step 1: Visit this link to copy the Google Drive Watch script to your account.
Step 2: In the script, move to line 09
, and there you enter the email address where you like to get the notifications for deleted files. Simply delete the mentioned email address there and enter your email address.
Step 3: This script creates a cron job that runs every 5 days. However, you can change to run at any desired interval. To do that, just replace the RUNNING_FREQUENCY
value in line 12
with the number of days. For example, if you want the script to run every day, simply set this value to 1. Apart from that, you can also specify the hour at which you want the script to run. You can change that in line 15
with the 24-hour format.
Step 4: After customizing the script as per your liking all you have to do is enable it. To do that, click on the RUN button from the top ribbon and hover over the Run function. Then click the enableDriveWatch option to enable and activate the script.
After that, you can close this window. Now, you will get an email notification on the mentioned interval that will list all the deleted files from your Google Drive along with the date.
Closing Words
This is a handy way to not lose important files and folders due to the new 30-day delete policy by Google. With the email notifications, you can see exactly which files are going to delete and if some important file is there then you can restore it before it goes away forever.