Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created August 9, 2020 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/b2493d5b799933c2d4eee3d365fd9384 to your computer and use it in GitHub Desktop.
Save iaindooley/b2493d5b799933c2d4eee3d365fd9384 to your computer and use it in GitHub Desktop.
Audit log
function logMemberAdded(notification)
{
var notif = new Notification(notification);
var added = notif.addedMemberToBoard();
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
sheet.appendRow([Trellinator.now(),added.name(),notif.member().name()]);
}
function logMemberRemoved(notification)
{
var notif = new Notification(notification);
var removed = notif.removedMemberFromBoard();
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
sheet.appendRow([Trellinator.now(),removed.name(),notif.member().name()]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment