Skip to content

Instantly share code, notes, and snippets.

View gist:fecdfb9e67ab03ff5fd0833e3f40f4cb
Card.findOrCreate(
new Trellinator().board("My Board").findOrCreateList("Today 🎯")
"Daily/Weekly/Monthly Recurring Tasks"
)
.checklist("Daily").items().each(function(item)
{
item.markIncomplete();
});
View gist:2e6d9fdd60f68e3b16a6cbfe22344354
var added = new Notification(notification).addedCard();
try
{
added.setDue(
Trellinator
.now()
.addHours(10)
.minusDays(1)
.next(added.currentList().name())
View gist:aacc01e1aa392b727830993d2d82e378
var added = new Notification(notification).addedLabel();
added.card().labels().each(function(label)
{
if(label.id() != added.id())
{
added.card().removeLabel(added.name());
}
});
View gist:55bba6c3b0177462399949d96d9b43dc
new Trellinator().team("Workspace Name").members().each(function(member)
{
console.log(member.name());
});
View gist:fce5c281358650911ddfd4f6afd25dfd
var created = new Notification(notification).createdCard(/Origin List.*/i);
created.board().lists().each(function(list)
{
if(list.id() != created.currentList().id())
{
created.copyToList(list,"top");
}
});
View gist:d5737399350cc3f803c21f63d53f20a6
var comp = new Notification(notification).completedChecklistItem();
comp.checklist().card().postComment(
"@"+comp.checklist().items().itemAfter(comp).member().name()+" You're up!"
);
View gist:e1077bf19ff090df2e02e55624ddb5ee
var new_workspace = new Trellinator().team("New Workspace");
new Trellinator().team("Old Workspace").members().each(function(member)
{
//new_workspace.addMember(member,"admin");//must be admins in a free team anyway, upgrade to BC to remove admins
console.log(member.name());
});
View gist:0a3aaf1182dc422e8c9fbc4128d9ca77
var target = new Trellinator().board("Archive Board");
TrelloApi.searchCardsInBoards(
new Trellinator().board("From Board"),
"is:archived"
//comment out the below line to run for more than one card
,1
).each(function(card)
{
card
View gist:a3a05912a78e8ad895192bdc1eec3616
var from_listname = "YOUR COMPLETED CARD LIST NAME";//update this with your actual list name
var to_boardname = "YOUR NEXT BOARD";//update this with the next board to move to
var to_listname = "YOUR NEXT LIST";//update this with the next list to move to
///////CODE GOES BELOW HERE//////////
var moved = new Notification(notification).movedCard(new RegExp("^"+RegExp.escape(from_listname)+".*","i"));
var copy = moved.copyToList(moved.currentList());
copy.board().customFields().each(function(cf)
{
View gist:038c11d73cacab701b3af3122cf27dd2
Card
.findOrCreate("Daily Tasks")
.addChecklist("My Tasks",function(cl)
{
cl.addItem("Something new");
});