8

I only work Monday through Wednesday. I would like to set it up so when clients email me on these days every week, they get a friendly reminder. How can I do this? It seem I would have to do it manually every week from the looks of it.

  • The question doesn't show any research effort. Please checkout How to Ask. – Rubén Oct 13 '16 at 4:39
4

I think you're correct; I only see a way to add a start date and an optional end date. You'll not be able to automate this with Gmail alone. You'd need some external tool, assuming someone has created such a thing. Someone with skill with Google Apps Script might be able to create something, though.

For what it's worth, Outlook doesn't let you do this sort of thing either.

At best, with Gmail, you could use the vacation auto-responder to send a message to anyone on any day. It's pretty smart in that it won't send the message multiple times if you receive several messages from one person.

4

I adapted my answer to a similar question to your situation. This Apps Script will reply if the current day is one of Thursday (4), Friday (5), Saturday (6), or Sunday (0). The set of days can be adjusted as indicated below.

function autoReply() {
  var interval = 5;          //  if the script runs every 5 minutes; change otherwise
  var daysOff = [4,5,6,0];   // 1=Mo, 2=Tu, 3=We, 4=Th, 5=Fr, 6=Sa, 0=Su
  var message = "This is my day off.";
  var date = new Date();
  var day = date.getDay();
  if (daysOff.indexOf(day) > -1) {
    var timeFrom = Math.floor(date.valueOf()/1000) - 60 * interval;
    var threads = GmailApp.search('is:inbox after:' + timeFrom);
    for (var i = 0; i < threads.length; i++) {
      threads[i].reply(message);
    }
  }
}
1

I've write an updated version compare to user79865's, add label for replyed email instead of using time, will be more accurate.

function autoReply() {
  var scheduled_date = [
    '2016-12-19', '2016-12-20',
  ];
  var auto_reply = "I am out of office. Your email will not seen until Monday morning.";

  var now = new Date();
  var today = now.toISOString().slice(0, 10); // today format: '2017-01-01'

  var label = GmailApp.getUserLabelByName('auto-replyed') || GmailApp.createLabel('auto-replyed');

  // today is the scheduled date
  if (scheduled_date.indexOf(today) >= 0) { 
    // get all email inbox, unread, without label auto-replyed
    var threads = GmailApp.search('is:unread is:inbox -{label:auto-replyed}');
    for (var i = 0; i < threads.length; i++) {
      var thread = threads[i]
      // reply the email and add auto-replyed label
      thread.reply(auto_reply);
      thread.addLabel(label);
    }
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.