How to create a Rule to archive a new card with the same name on a card already in board?
Asked by Cesar Sasaki:

Hi

Can I create a rule to archive automatically a new card that added to the board if there is another card with the same name already on the board?  

Thanks


Answers:
author: Iain Dooley
body: [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) there's no direct way to do this, but here's a somewhat insane workaround:

First create this command:

```
when a card is added to the board, collect all cards with a name starting with "{triggercardname}" into linked items in checklist "Duplicates", for each card linked from an item in checklist "Duplicates", archive the card, find a card with link "{triggercardlink}", unarchive the card, remove link "{triggercardlink}", remove item "{triggercardlink}", and add the green "Check Duplicates" label to the card
```

Then create this command:

```
when the green "Check Duplicates" label is added to a card, remove the green "Check Duplicates" label from the card, for each card linked from an item in checklist "Duplicates", unarchive the card, remove link "{triggercardlink}", find a card with link "{triggercardlink}", and archive the card
```

I can't test this completely because I don't have business class and can only have one command of each type, but I have tested each command individually -- so long as the addition of the "Check Duplicates" label triggers the second command, what you end up with is the card you created that matches any cards in the board being archived.

One caveat is that you can't do "equals", the closest you can get is "starting with".

comments: author: Cesar Sasaki
body: Hi [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) it worked! thanks!

It seems confusing but it worked, I'll have to check my other rules because when you unarchive and archive a card is the same as "when added"?


author: Iain Dooley
body: [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) haha yes it is quite a crazy workaround. If you're using Gmail you might also like my product BenkoBoard which will thread your conversations, so you can have one card for each Gmail thread which will update automatically when new emails arrive on the same conversation:

<http://www.benkoboard.com/>


author: Iain Dooley
body: [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) oh sorry to answer your question: no unarchiving won't trigger an "added card" event.


author: Cesar Sasaki
body: Hi [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) it seems that you have lots of experience using Butler rules.

I already had a rule that post a http request when a card is added.

How can I merge it with the one that archives the duplicate card?.

Can it be done that only the first card posts the http request and not the duplciates that comes after?


author: Iain Dooley
body: [@Cesar Sasaki](/t5/user/viewprofilepage/user-id/1808896) in general if I want to do something like that I add labels and then filter to only trigger on cards containing certain labels.


author: Cesar Sasaki
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) but how can I add the label to the first card?


author: Will Ashley
body: Hello. I believe this can be achieved with the following Butler rule

![Dealing with Duplicates.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/167479iDBCD78936BA553AC/image-size/large?v=v2&px=999 "Dealing with Duplicates.jpg")

Basically when a new card is created on a board, it looks for any other cards on the board with the same exact name. If one is found, then the new card is linked to the original card of the same name and then the new card is archived.  
You can click on the original card to see the linked card also, even though it is now archived.

comments: author: Nechamah Steinberg
body: I want to do the opposite: I want to create a rule that when a new card is created on the board it looks for duplicates and archives the **original**card, leaving the new updated card on the board. Any tips on how to create this automation rule? Thanks!


author: R?mi BERNI?RES
body: Something like: If I create a new card

Then: Copy the same card in the same board

And move it to "Archives"

I think you want to duplicate if, by mistake, you delete the card

comments: author: Cesar Sasaki
body: Hi I dont want to duplicate I'm just using the email to trello function so sometimes I get the same email twice.


Tags: archive

duplicate

rule