Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created August 19, 2020 06:04
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/4682199a988a330cf77b85e734f21930 to your computer and use it in GitHub Desktop.
Save iaindooley/4682199a988a330cf77b85e734f21930 to your computer and use it in GitHub Desktop.
Extract items to Google
function extractItemsToGoogle(notification)
{
var moved = new Notification(notification).movedCard("Export");
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Export");
sheet.appendRow(
[
moved.link(),
moved.name(),
moved.checklists().find(function(cl)
{
var ret = cl.name()+": "+cl.items().find(function(item)
{
if(item.isComplete())
{
return item.name();
}
else
{
return false;
}
}).asArray().join(",");
}).asArray().join(";")
]
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment