If I understand correctly what you are asking is:
- query for file on a folder in Google Drive
- check the creation date of all files
- if the most recent file was uploaded more than X hours ago send an email
I think you can do everything with Google App script. You need to create a new script file in your Drive account and add inside it this function.
function isBackuped() {
var delay_h = 0; // or 2 or 24
var delay_m = 70;
var current = new Date();
current.setTime(current.getTime() - (delay_h * 60 * 60 + delay_m * 60) * 1000 );
var recent = false;
var folders = DriveApp.getFoldersByName("backup database");
while (folders.hasNext()) {
var backup_folder = folders.next();
var files = backup_folder.getFiles()
while (files.hasNext()) {
var backup = files.next();
var created = backup.getDateCreated();
if (created > current)
recent |= true;
}
}
if (!recent) {
GmailApp.sendEmail(
"[email protected]",
"Mail Subject: Backup issue",
"Mail Body: There is no recent upload!");
}
}
Then you have to create a trigger that runs the function automatically every X hours: click on Edit > Current project's triggers and on the link "No triggers set up. Click here to add one now", and set a trigger to run isBackuped
based upon time every X hours.
Warning: You will need to allow permission to this script for access your Drive and your Gmail account. It will be asked the first time you run the function, so run it at least once using the play button in the instruments bar.