Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Share your Butler-hacks. Here's an IF-Conditional

So I got it in to my fool head the other day, of trying to figure out how to hack a way in to getting Butler to do if-conditionals. And somehow came up with a super niche, limited way to get it to work!

So I wanted to start a discussion of any weird Butler-hacks people have come up with to eke out that extra bit of efficiency against the limitations of Trello and Butler they've got squirreled away for a rainy day.

Anyways, I'll start. Here's a basic IF-Conditional example:

When a card button Prepped is clicked
Copy over a Tasks checklist, and assign a random member
IF FastTracked customfield checkbox is checked
THEN Tag it as Urgent, and assign 2 more members

The Setup:
First, create a personal board and call it Conditionals, and make a card named Checked in it.
Then create a custom field checkbox called FastTracked in whatever board you're working in.

The Butlering:
Set up your Card Button. The bit in Blue is the Conditional.
What happens is that it tries to lookup a card that is named whatever value FastTracked is. With the checkbox, its either "Checked" or its "".

Given that there exists a Checked card, it'll look it up, then get on with tagging and adding members. But if FastTracked is unchecked, there is no card called "". And Butler doesn't like it when it can't find/lookup a card. The command run immediately comes to a screeching halt, and the rest of the run is skipped entirely.

Boom, instant if-conditional. You can't do an Else though, as it relies on crashing out of the command run. But if you're running through a multiplier like "For Each Card" however, it'll only crash out of that one branch, and will continue on to work through all the other cards!

As an extra, though I haven't tested it yet, I'm pretty sure this also works on other custom field types. You just have to create a card on the Conditionals board for every acceptable value. Operators like >= are still out of reach, but you can have things like if Y is an integer between 2 and 10 by just creating every integer in between on the Conditionals board.

Super proud of all the time I wasted figuring this out :P Anyone else have Butler-hacks to share?


for the dabbler in Butler-fu: Variables , Lookups , Wildcards , Custom Fields, and Arithmetic  

Like Ari likes this

Numeric Conditionals
A non-trigger way to do greater-than, lesser-than, etc., portioning away part of the command for only if the condition was met.

If custom-field X is greater than Y, Do Things, else Do Nothing.

The entire logic chain rests on the fact that the Collect All Cards command can filter for cards with a custom field greater/lesser than (or equal to) a number. Outlined in Light Blue below.

The reason the rule below is so long, is just to make sure that when you Collect All Cards, you've narrowly defined it enough so that it will only choose the current card its triggering on. Which is the role of the Blue Butlering tag. That and cleaning up after itself. Technically, you only really need the one action itself, if you can narrowly define it well enough for other reasons, and don't mind random lists just lying about :P

Only the cards moved into ThisList that have the custom-field Value > 5 will have the Red ActedOn tagged on to it in the end.

Be careful to test out the command run in full though, as it can get rather long and Butler can decide its too long and cancel the command?? Didn't get that on these tests, but its happened before.


Butler trick: Different outputs for different Labels

Using a single rule that reacts differently depending on which label is attached. Targeting a different list or card or checklist. (they all have to be the same colour though)


Log in or Sign up to comment
Community showcase
Published in Trello

A Trello template to help you clean up your Confluence Space

Calling all Trello + Confluence users! We're celebrating all things Work and Wellness in our Confluence collection, where our team has been sharing activities to create more mindfulness around the ...

924 views 4 13
Read article

Atlassian Community Events