Is there a way to find duplicate cards and link them together or archive the new version?
Asked by Jared Greenberg:

I work for a company that deals with recipes. We use trello to keep track of each meal/recipe by creating a card with the meals name and a unique meal ID number. Our meals repeat across new menus so when we create all the cards via email, there are sometimes duplicates. We can't use the find cardname feature because there are just too many unique card names to enter all of them. Is there any trello feature I'm missing or extension that would let us create a rule to automatically find the duplicate cards when a duplicate is created?


Answers:
author: Mutya A
body: Hi Jared,   

Great question! We had a similar use case that wants to check for card name duplicates as well.

You mentioned you need to check if there is a way to find duplicated cards across the board, and either link them together or archive them. Yes that is possible. I can show you how to spot a duplicate and link them together. I have used Automation rules to find cards that has the same card name when a new card is created in a board.   

For context to anyone reading this, I am sharing a Youtube guide on how to create an Automation rule: <https://www.youtube.com/watch?v=WSMfGoXrL9I>

The automation rule contains a Trigger that looks for when a "card is created" and then it performs an Action/s which is "find a card using the card name of the created card" AND "link cards together". Below is how the rule looks like:

![card_created.png](https://community.atlassian.com/t5/image/serverpage/image-id/263323i531FB5D930AD74B6/image-size/large?v=v2&px=999 "card_created.png")

Note: The {cardname} is what you call an [automation variable.](https://support.atlassian.com/trello/docs/butler-variables) You can use it to get the title of the current card that's been created. This is what the Actions look like. Please note that the order of the Action is important. You must find the card first before linking them together:   
![Automation_cascade_find_cardname_link_together_2023-06-06T01_58_10.520Z.png](https://community.atlassian.com/t5/image/serverpage/image-id/263325i994C4ECC7AA4BBE1/image-size/large?v=v2&px=999 "Automation_cascade_find_cardname_link_together_2023-06-06T01_58_10.520Z.png")  

To test this rule:

1. Create a duplicate card with the same name of an existing card in the same board
2. Wait for the Automation to kick in. It depends how many cards you already have in the board. If it's a lot, it may take a while, so come back after a few minutes
3. Go back to the duplicate card an open it. You should see an attached card linking to the existing card.

You can edit the automation if you prefer to archive it, or you can perhaps add a label called "Duplicate" or even create a "Duplicate" list to move the cards there then review it later for manual archiving. Up to you :)   

Hope this helps but do let me know if there's anything that I missed!

comments: author: Gerg? Hajdem?r
body: Hi, I found your description really useful as I'm looking into the same functionality. My issue is that no matter the content of the original card, when using the following rule it always archives the original one. :/ How could I achive to only archive the new one - which is the real duplicate?

Thanks in advance :)


author: Daniel Fransson
body: I was struggling with the same thing, and I think I found a solution. When the new card is added there is actually two cards that matches the find criteria, so you need to add a second find statement in the automation to find the trigger card, which is the copy that triggers the automation in the first place.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/294617i3C67DDAB857B76A9/image-size/large?v=v2&px=999 "image.png")

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/294618i1DDC031365E67858/image-size/large?v=v2&px=999 "image.png")

This works for me, but I have had a hickup or two where the original card was moved. So I am looking at making some insignificant change to the original card (like moving it 1 position up and then 1 position down in the list), then find the trigger card and move it. Right now I am just moving the duplicates to another list, but when I see that it works properly I'll archive them directly.

The tiny error in the original post is that it states that {cardname} is the name of the card that is being created, but it rather seems to be the name of the original card.
> "Note: The {cardname} is what you call an automation variable. You can use it to get the title of the current card that's been created."