I am trying to retrieve email threads from only a specific folder which I named 'Approval_needed'. I have found a way to get all of my inbox threads like so from the Google Apps Script Reference page:
var threads = GmailApp.getInboxThreads();
for (var i = 0; i < threads.length; i++) {
Logger.log(threads[i].getFirstMessageSubject());
}
Is it possible to do something like getInboxThreads for folder 'Approval_needed'
?
I have searched around and have not found an answer for this. I have found other methods such as getPriorityInboxThreads()
and getStarredInboxThreads()
, but nothing like getInboxThreads(string)
.