This is the script:
function gmailAutoarchive() { var delayDays = 3; // will only impact emails more than this many days old // Get all the threads that