Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/2ad9701f1095b8eaeef2952c458f1723 to your computer and use it in GitHub Desktop.
Save iaindooley/2ad9701f1095b8eaeef2952c458f1723 to your computer and use it in GitHub Desktop.
Copy to list based on label
function copyToListBasedOnLabel(notification)
{
var card = new Notification(notification).movedCard("Finished Posts");
card.labels().each(function(label)
{
if(label.name() == "FB")
card.copyToList(card.board().list("Facebook"),"top");
else if(label.name() == "TW")
card.copyToList(card.board().list("Twitter"),"top");
else if(label.name() == "IG")
card.copyToList(card.board().list("Instagram"),"top");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment