Butler rule trigger on removing checklist item that is also a card link
Asked by Vongsawat:

I'd like to make a Butler Rule. Where whenever I remove an item from a designated checklist, where that item is also a link to another Trello card, that I would then follow the link to the Trello card remove the corresponding {triggercardlink} from the checklist over there.  

Basically a way to automatically remove task dependencies when you remove one side of the equation.  

I'm kinda stuck on the trigger part specifically, as I can't figure out how to make the trigger be about when I remove an item *that is also*a link. There is a filter but it is only for text filtering..


Answers:
author: Vongsawat
body: Hopefully the forum doesn't eat this answer either..  

*when an item containing "[https://trello.com/c/{\*](https://trello.com/c/%7B*) }" is removed from checklist "Tasks", find a card with link "[https://trello.com/c/{wildcard1](https://trello.com/c/%7Bwildcard1)}", and remove item "{\*}{triggercardlink}{\*}"*


author: Vongsawat
body: Woops, figured it out. Just had to filter for removed items that contained "<https://trello.com/c/>"


author: milynnus
body: [@Vongsawat](/t5/user/viewprofilepage/user-id/3989989) I investigate this a bit trying to understand what is meant to create a card for an item and looking for the links as I do not use native Trello much as user. Are you referring to the links in the Activity?

or this?

![Screen Shot 2020-07-06 at 5.38.04 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/101743i0034CAFE84401E38/image-size/large?v=v2&px=999 "Screen Shot 2020-07-06 at 5.38.04 AM.png")and the is card link in Project Card back to the card that has this item that you are deleting?

comments: author: Vongsawat
body: Huh, sorry about this. I already found a solution, posted it here as a reply, and marked it as answered.... (even got a badge for it) and it seems the forum deleted it for some reason?

The card url yes. I'm not super sure what you were saying with the Card Project, but its essentially two cards that have each other's url as a checklist item. One as a parent, one as a child. And was trying to find a way where deleting one side of the dependency would delete the link on the other.  

The solution was just to filter the trigger: when removing checklist items, for ones that started with the first part of the url. And then some wildcards to ensure I could Find the other end of the Dependency and get rid of the trigger link on that side.  

*when an item containing "[https://trello.com/c/{\*](https://trello.com/c/{*) }" is removed from checklist "Tasks", find a card with link "<https://trello.com/c/{wildcard1>}", and remove item "{\*}{triggercardlink}{\*}"*


author: milynnus
body: [@Vongsawat](/t5/user/viewprofilepage/user-id/3989989) Nice to have a simple solution.

**I think I found the answer here : [https://help.trello.com/article/1165-task-dependencies#:\~:text=Store%20a%20task's%20dependencies%20as,the%20former%20in%20the%20attachments.](https://help.trello.com/article/1165-task-dependencies#:~:text=Store%20a%20task's%20dependencies%20as,the%20former%20in%20the%20attachments.)**

Question : when you first created the item which is card link, did you have to do it manually. Create card from item, copy and paste links from Activity and also created a link back to source card in the new card.

I am trying to figure out what is this {triggercardlink}....is it automatically maintained by Trello?

This is new card created

![Screen Shot 2020-07-06 at 6.31.16 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/101744i4927342482FA9723/image-size/large?v=v2&px=999 "Screen Shot 2020-07-06 at 6.31.16 AM.png")


author: Vongsawat
body: The[Variables](https://help.trello.com/article/1157-variables) page is super useful for eking out the extra mile out of Butler automation. As is taking the extra step in to [Wildcards](https://help.trello.com/article/1156-pattern-matching-and-wildcards), which I don't use so much but came in useful here.  

{triggercardlink} is whatever card triggered the Rule in the first place. Useful in this case as I'm [Finding](https://help.trello.com/article/1193-butler-card-lookups) the dependent card, which changes which card Butler considers the Current card. I can then remove the link to the initial trigger card, which I placed in a checklist.  

And yes, I link them manually, as I prefer two lists to manage parent and child links respectively. As opposed to the default Linked Items (what you get when you convert an item in to a card for instance) which has a link on one side and attachment on the other (the latter which takes up so much UI space..)


author: milynnus
body: You might want to compare the Trello version.

<https://youtu.be/SKbiTvH1sVk>

Hope to turn this into as a service.


author: Vongsawat
body: Nice, that seems like a pretty cool alternate to Butler.  

I still prefer Butler just for pure flexibility though (even if Gold limitations are sometimes a problem) It seems most people use Trello this way though, with In-Progress and Completed lists, which runs counter to my workflow. But seems the way to go if you're making a service/product.


author: milynnus
body: Yes I would advocate Butler where it is all possible and within your entitlement.

Allowing people the flexibility to built their own list and sending to different list dynamically one of the design point. Hence not fixed by the rules built by the admin in Butler.


author: Vongsawat
body: If its easy for the user to configure the rules and triggers, or chain together certain rules, that'd be pretty powerful yea.  

Looking forward to its release then :P


Tags: butler