Auto-linking to other cards by Title Name
Asked by Chris W:

I have board with about 1k cards. Each card often refers to other cards, indicated by a reference number at the top of the card description (e.g., "Related to: 2613, 1632, 1730"). This reference number is included at the beginning of each cards title (e.g., "2613: 6 Pallet 172s").

My goal is to create a link for each reference number, allowing users to navigate directly to the related card. Ideally, I'd like to automate this process to save many hours doing it manually. However, I've been unable to find a power-up that provides this functionality.

I've noticed that there doesn't seem to be an existing implementation that restores a "#" + Card Title linking system. Is anyone aware of a solution or workaround for this?

Any guidance would be greatly appreciated.

Thank you!


Answers:
author: Hannah Humbert - Simpla Workflows
body: Hi Chris! You could use butler automation for this. E.g.   

```
when the description of a card contains "Related to: {*}", find a card titled "{wildcard1}{*}", and link the cards together
```

<br />

However, you would need to prefix the reference number with "Related to: " each time you want to reference a card.  

Can I suggest an alternative using a custom field? Maybe try something like this instead:  

```
when custom field "Related to" is set to "{*}", lookup a card titled "{wildcard1}{*}", set the card's description to "{carddescription}\n--\nRelated card: {foundcardlink}", and clear custom field "Related to"
```

<br />

You would just need to type in the reference number into the custom field and it would then add the card link to the description (you could link it in the attachments as an alternative).

comments: author: Chris W
body: Thank you very much for your time and assistance! The custom fields option is a great recommendation! It looks like I will have to modify it a bit but at least knowing it's possible is great!  

Thank you again!


author: Carolina Lopez
body: Hi Chris,

If I understood correctly, you can reach this result using **Trello Automation** with **wildcards** and **variables**. You can enable the Advanced options to add filters to the triggers and create a rule similar to this one:

```
when the description of a card starts with "Related to: {*}, {* }", find a card titled "{wildcard1}: {*}", link the cards together, find a card titled "{wildcard2}: {*}", and link the cards together
```

When you create a rule, it doesn't apply retroactively to the cards you already created, so it will only run on the cards you create from now on.

As a workaround, you can create a list, create a rule like the one below, and move the cards to that list.  

```
when a card with a description starting with "Related to: {*}, {* }" is added to list "Rule", find a card titled "{wildcard1}: {* }", link the cards together, find a card titled "{wildcard2}: {* }", link the cards together, find a card with link "{triggercardlink}", and move the card to the top of list "{triggercardpreviouslistname}"
```

Please note that depending on how many references you use to mention in your descriptions, you'll need to create more than one rule. For example, if you use **"Related to: 1234"** , **"Related to: 1234, 5678"** and **"Related to: 1234, 5678, 9012"** , you need to create **one rule for each one** , using these patterns on the triggers: **"Related to: {\* }"** , **"Related to: {\*}, {\* }"** and **"Related to: {\*}, {\*}, {\* }"**. Also, you'll need to add an action for each wildcard, so you'll use {wildcard1}, {wildcard2}, and {wildcard3}.

These are the articles used to create the rules:

[Automation overview](https://support.atlassian.com/trello/docs/butler-overview/)  
[Pattern matching and wildcards](https://support.atlassian.com/trello/docs/pattern-matching-and-wildcards/)  
[Finding or looking up cards](https://support.atlassian.com/trello/docs/finding-or-looking-up-cards-butler-advanced-topic/)  
[Automation variables](https://support.atlassian.com/trello/docs/butler-variables/)

Trello Automation is a powerful tool, so it may be hard to understand sometimes. Don't hesitate to ask if you have any questions!

comments: author: Chris W
body: Thank you for your time and assistance! Great resources shared and this has also helped me learn more about how this and automation works. Really appreciate the assistance!

Thank you!


Tags: automation

link