Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to create a Butler comand in my Trello Board triggered on Mon, Tue, Wed and Thu only?

kraeMit October 9, 2020

Hi,

I'd like to create my 'Daily List' by creating a new list and copy my daily card with a checklist to it.  So far it works with 2 commands.

I managed to do by the trigger 'every day' but wondering, if I can do this for some days in a week only? Can I creat a list of days somehow?

Thanks for a tip!

 

Regards
kraeMit

4 answers

1 accepted

0 votes
Answer accepted
Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 11, 2020

@kraeMit just create 4 commands that run weekly on each of those days

milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2020

@Iain Dooley agree. I worked on that add-on module just to see what other ways I can extend the use of the http request. Butler does not support conditions. So this add on uses a list of cards as a lookup to compare it with the {weekday name}. I should think there are other comparative options can can be added. 

Like Iain Dooley likes this
kraeMit October 12, 2020

@Iain Dooley  : Thanks, that's what I mentioned above as a solution. I will do it. 

0 votes
kraeMit October 10, 2020

Thanks for your postings. 

In the moment I'm happy with this commands : 

every day, create a new list named "KW{weeknumberlong}: {weekdayshort}, {monthdaynumberlong}. {monthshort}" in the top position on board "Daily Task Management mkr"
every day, copy each card in list "Repeated Cards - don't delete" assigned to me to the top of list "KW{weeknumberlong}: {weekdayshort}, {monthdaynumberlong}. {monthshort}" on board "Daily Task Management mkr"

This does the trick, but creates 3 lists which has to be removed manualy. I thought about doing such Butler commands for each day (Mon, Tue, Wed, Thu), but that's somehow more overhead. 

I'm wondering what else possibilities one have to create commands, e.g. using python?

Thanks for reading!

milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2020

@kraeMit  You can definitely do it manually for each day that you need to run. The only option in Butler to “create commands” is basically the Butler http request available for paid accounts. I used it to create an Butler add-on so that you can run any piece of python code for things you cannot do in Butler. I built that with a low code automation tool. 

0 votes
milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2020

@kraeMit I worked on this just for fun. I doubt anyone would want to implement this but it works

every day at 5:00 am, create a report in variable "run_days" with all cards in list "🔥 Hot" with the "Run Today" label using pattern "{cardname}^{weekdayname}", post to url "https://25368.wayscript.io/test?registry=None&module=None" with payload "{\"card_id\" : \"5f81a53052ba3b7d2f718666\", \"report_variable\" : \"{$run_days}\"}", and send an email notification to "li....hss@gmail.com" with subject "Is a match found?" and message "If match is found the result will be the new Trigger Card name : {httpresponse.output}"

I have a list with cards named Monday through Sunday. Those days I need to run, I will have a label "Run Today" set. Pass the report variable via Butler Http to an endpoint that company the card name with the {weekdayname}. Send email to myself to see results (testing purpose only)

item_list = para['report_variable'].split("\n")
item_list.pop() #remove last element


run_flag = False
for item in item_list:
   split_item = item.split("^")

   if split_item[0] == split_item[1]:
     add_to_cardname = split_item[0]
     run_flag = True
     break


if run_flag == True:
   trigger_card = client.get_card(para['card_id'])
   card_new_name = '''{} {}'''.format(trigger_card.name, add_to_cardname)
   trigger_card.set_name(card_new_name)

if there is a match change the Trigger card name as a way trigger the processing you need. It can be other ways. 

when the name of a card contains "{weekdayname}", add the red "Butler Will Run Today" label to the card

Above is based on technique I developed. More details are available on Extending "A Powerful Combination" post.

Below is a picture of the list. 

Screen Shot 2020-10-10 at 9.16.27 PM.png

milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2020

@kraeMit i have made the above generic to be able to compare any card variable with a value or Trello variable and to set a label which can be used by Butler. It can be useful other types of trigger not supported by Butler  

0 votes
tokcum
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 9, 2020

Hi kraeMit,

in most cases when there are triggers within Jira they are based on Cron expressions. Also many 3rd party add-ons leverage Cron expressions. They are a little bit different from Cron expressions you may be familiar with in Linux though.

Please have a look at this article. It's very technical but the examples help in getting started.

Construct cron expressions 

If you feel uncomfortable with this, feel free to contact me again.

Kind regards,

Tobias

tokcum
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2020

Sorry, my reply was misleading. I did some research on Trello and realized that Trello doesn't support Cron expressions.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events