Skip to content

Instantly share code, notes, and snippets.

@sweenzor
Created December 24, 2013 07:10
Show Gist options
  • Save sweenzor/8109816 to your computer and use it in GitHub Desktop.
Save sweenzor/8109816 to your computer and use it in GitHub Desktop.
Gmail inbox audit logging
/**
* Retrieves all inbox threads and tags them
* that way, when you accidentally archive something,
* you can figure out what it was!
* https://script.google.com/macros/
*/
function auditLogInbox() {
var threads = GmailApp.getInboxThreads();
var label = GmailApp.getUserLabelByName("auditlog");
label.addToThreads(threads);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment