I need a simple Google Script for a Google Spreadsheet. The spreadsheet will have a number of columns (names, addresses, phone numbers, etc.). One of those columns will be a list of our volunteers’ email addresses. Three of the columns will be lists of deadline dates associated with each volunteer. There will also be three columns of messages (one message for each of the three deadlines).
What I need is for the spreadsheet to automatically check if the DUE DATE is within 5 days (e.g. var daysBefore = 5). And, if yes, I need the script to grab the MESSAGE in the column next to the upcoming due date and automatically EMAIL it to the email address in the adjacent email column. Finally, once the reminder is sent, it should be duly noted somehow (either coloring the cell red or leaving a “reminder sent” message in the adjacent column. That’s basically it.
We need to be the script to run once a day (but I can set a Time-driven Trigger once the script is active) , but if we can also have it run when we open the Spreadsheet (onOpen) that would be great. That’s it.