Automating label updates between cards on different boards
Asked by Carla Ruhl:

I have the following butler task:  
when any label is added to a card with custom field "Roadmap" checked, find a card titled "{cardname}" on board "Tape Interop Roadmap", and add the pink "{labelcolor} {labelname}" label from the card  

However, I have not found a way to remove the "pink" color text and just use the {labelcolor} variable.

I would like a butler task that essentially takes any label update (add/remove) on a card on one board and updates the label (add/remove) on the copied card on another board.


Answers:
author: milynnus
body: [@Carla Ruhl](/t5/user/viewprofilepage/user-id/4047387) Sorry I am unable to give you the rule only because I think it cannot be done and I hope my explanation helps in some way. From the picture there 2 ways to have a label on a card. (1) Add : you need a label object while (2) Create : you need a colour and name both in text. The latter explains why you cannot refer to colour using {cardlabel} variable which would a property of a label object. I know it is possible with some code and deliver it via a http request. ![B83AC9C3-26A0-4B36-9600-6F37E3B04307.jpeg](https://community.atlassian.com/t5/image/serverpage/image-id/106774i6DD5767CBB00E44C/image-size/large?v=v2&px=999 "B83AC9C3-26A0-4B36-9600-6F37E3B04307.jpeg")


author: milynnus
body: [@Carla Ruhl](/t5/user/viewprofilepage/user-id/4047387) it is worth noting that colour and name are two properties of a label. A green coloured label can have names llke "Green", "Purple", "" and each is a different label on the board. You can try this out on the board. So when you use "find a card" in Butler then the {labelcolor} {labelname} is from the card Butler found and it uses it as the current card.

comments: author: Carla Ruhl
body: Variable names for each card's labels have prefixes, such as card, triggercard, currentcard.

Whereas {labelcolor} and {labelname} are when a trigger for a label add/change/remove action is performed.  
See information here: <https://help.trello.com/article/1157-variables>  

Here is my updated rule, that is still not working, as there is no way to utilize the {labelcolor} variable:  
when any label is added to a card with custom field "Roadmap" checked, find a card titled "{cardname}" on board "Tape Interop Roadmap", and add the***pink*** "{labelname}" label to the card

notice the ***pink*** portion of the rule  

Is there a way to override this in butler?


author: milynnus
body: [@Carla Ruhl](/t5/user/viewprofilepage/user-id/4047387) Are you trying to avoid the hard coding the colour and have Butler use the label colour in the card that you found? Or are you trying to override the colour to pink?


author: Carla Ruhl
body: what I think I need is:  
when any label is added to a card with custom field "Roadmap" checked, find a card titled "{cardname}" on board "Tape Interop Roadmap", and add the "{labelcolor}" "{labelname}" label to the card  

This will utilize the same color and label combination on both boards


author: milynnus
body: [@Carla Ruhl](/t5/user/viewprofilepage/user-id/4047387) Find will set the current card to the card you found. Have you tried using Lookup and use {found...} for the variables in the card you are looked up and {...} for the variable from the originating card.


author: Carla Ruhl
body: The problem is not knowing the variables.  
The problem is the predefined color that butler only allows with the phrase "add the pink name label to the card".

The original rule I posted above works for the labelname, just not the color. I do not need to "find" or "lookup" anything. The information is in the variable {labelcolor}.

If you have a rule suggestion, please provide the entirety.


Tags: butler

label