Editor’s Note: Guest author Alex Moore is the CEO of Baydin, an email productivity company. --Arun Nagarajan
var d = new Date(); d.setDate(d.getDate() - DAYS_TO_SEARCH); var dateString = d.getFullYe ar() + "/" + (d.getMonth() + 1) + "/" + d.getDate(); threads = GmailApp.search("in:Sent after:" + dateString);
var userEmailAddress = Session.getEffectiveUser().getEmail(); var EMAIL_REGEX = /[a-zA-Z0-9\._\-]+@[a-zA-Z0-9\.\-]+\.[a-z\.A-Z]+/g; # if the label already exists, createLabel will return the existing label var label = GmailApp.createLabel("AwaitingResponse"); var threadsToUpdate = []; for (var i = 0; i < threads.length; i++) { var thread = threads[i]; var lastMessage = thread.getMessages()[thread.getMessageCount()-1]; lastMessageSender = lastMessage.getFrom().match(EMAIL_REGEX)[0]; if (lastMessageSender == userEmailAddress) { threadsToUpdate.push[thread]; } } label.addToThreads(threads)
yeah. Seems to have been overloaded for days. Turns out google Drive is not a good way to distribute items in high volume.
The script link (https://script.google.com/d/11c63LM4rOTxCP5uqffLDhIaEQFmNo0pZJT3_dbXsvlHT-Sz1ywxNlZhf/edit?usp=sharing), in the sentence "You can get the script here." towards the end of the post, is showing the following error:"There are currently too many people viewing this file. Please try again later."Is there any other link where we can see the full script?
Is there a mirror for the script somewhere?
Post a Comment
4 comments :
yeah. Seems to have been overloaded for days. Turns out google Drive is not a good way to distribute items in high volume.
The script link (https://script.google.com/d/11c63LM4rOTxCP5uqffLDhIaEQFmNo0pZJT3_dbXsvlHT-Sz1ywxNlZhf/edit?usp=sharing),
in the sentence
"You can get the script here."
towards the end of the post,
is showing the following error:
"There are currently too many people viewing this file. Please try again later."
Is there any other link where we can see the full script?
Is there a mirror for the script somewhere?
Post a Comment