Butler Button or rule to push a card button?
Asked by Cesar Sasaki:

Hi

I have create a card button, and instead of clicking on every card I would like. a trello rule or button to push the card button every day for example.

Can it be done?  

thanks


Answers:
author: Iain Dooley
body: [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) you can go to the "Calendar" section of Butler to create a recurring rule instead of creating a card button. The actions you can take with card buttons and calendar rules differ slightly, did you find that you can't take the action you wanted in the Calendar section?

comments: author: Cesar Sasaki
body: Hi Ian, I checked the "Calendar" section of butler , but

That command can run for each card?

My card button posts an http request and with the response sets a custom attribute.

Regards


author: Iain Dooley
body: [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) what you can do with the calendar section is move cards between lists and apply a filter to select which cards move. You can combine this with a rule that triggers when cards are moved, and that command can move the card back to its previous list. You might also be able to use a wildcard in the list name, so your command would end up something like:

every day move all cards in list "{\*}" to "Trigger Command"

and then your other rule is something like:

when a card is moved to "Trigger Command" do the http post thingy and move the card to the top of list "{previouslistname}"


author: Cesar Sasaki
body: That seems legit! haha! thanks I'll try it! Hope does not mess up other rules about getting to a certain list goes. the "Previouslistname" can be also a trigger?

For example for my request :

when a card is moved to "New" and previous list name is not "Trigger Command List"?


author: Iain Dooley
body: [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) hmm you can't base a condition on previous list name, but you could, for example, add a label "Triggered" at the start of your Trigger Command and then remove it at the end of the command, and then in your other list move commands, add a filter to only run on cards that don't have the "Triggered" label.


author: Cesar Sasaki
body: Hi Ian , Yes I got that is not on list "Triggered Command" do A (For my other rules)

But I could get this to work : {previouslistname}

when a card is added to list "Cerrado", post comment "Regla2", and move the card to the top of list "{previouslistname}"

Obviously my command is not posting a comment but I'm just doing some exercises and tests.


author: Iain Dooley
body: [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) it looks like the variable name is:

triggercardpreviouslistname


author: Cesar Sasaki
body: Hi Ian thanks! it worked


author: milynnus
body: [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) glad to see someone using the HTTP request. FYI... I built an app that allows people to do exactly what you do except the you can attach any module behind the HTTP request so it can be used to serve any user of the service. If what you have coded for yourself is something that Butler cannot do, I would like to code it and add to my library. Care to share it? A description is enough.


author: Cesar Sasaki
body: Hi

Not sure if I understood this correctly.

But the http request that. I made is simple it brings the logged hours from Jira to each card in trello (1 card in Trello = 1 issue in Jira)

Jira can not send webhooks that include custom attributes (to get the trello id) as Trello can.


author: milynnus
body: [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) I misunderstood when you wrote "My card button posts an http request and with the response sets a custom attribute." I thought you were using Butler HTTP Request command. It does the same thing and it is not limited to Jira, it can be any 3rd party system.  
In any case, I am glad you found a solution that works for you.   


author: Cesar Sasaki
body: [@milynnus](/t5/user/viewprofilepage/user-id/3947182) I'm using the HTTP Requests in 2 ways :

1.-When a card is added to the board it creates an issue in Jira (this can be done with the plugin also) but with the response I set. a custom attribute called "JIRA ID"

1.- Create a Button that when pressed Go to Jira with the JIRA ID and get the Hours Logged in jira and put them on a custom attribute called Hours


author: milynnus
body: Thanks for sharing.


author: Soumyadeep Mandal
body: Hi [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) ,

You can automate everything by using Butler rules.

<https://help.trello.com/article/1198-an-intro-to-butler>

<https://blog.trello.com/butler-power-up-trello-automation>