Apply Gmail Label RulesapplyGmailLabelRules(rules) takes rule objects {query, label, archive}, creates any label that does not exist, applies it to matching…
Get Unprocessed ThreadsYour nightly job pulls vendor receipts out of Gmail into a sheet. Run it twice and you get every receipt twice. getUnprocessedThreads(query…