a filter puts certain emails in a label then I read them with
var folder = "[Gmail]/MAJTableauLR";
var threads = GmailApp.getUserLabelByName(folder).getThreads();
and extract data the thread is then trashed.
for (n in threads) {
var message = threads[n].getMessages();
message[0].moveToTrash();
}
During a subsequent execution of the same script, it includes the messages put in the trash whereas if I put them in the trash it is good to exclude them from this folder. So how can I exclude these messages from the trash before they are permanently deleted in 30 days??