Creating a card from template and connecting with the clicked card
Asked by Zden?k Nov??ek:

Hello,

I would like to create a button that will make a copy of the card from the card template and then connects this newly created card with the card from which I clicked the button. And also if I could rename a new card from randonName1 to the end of the card name from which the button was clicked that would be a bonus. (the beginning of the card name from which I am clicking is always the same)

Thank you for your help


Answers:
author: milynnus
body: [@Zden?k Nov??ek](/t5/user/viewprofilepage/user-id/1215370)

Is this what you are looking for
> find a card titled "A Template Card", copy the card to the top of list "Inbox", find a card with link "{copycardlink}", add link "{triggercardlink}", and rename the card to "{triggercardname}"


author: Hannah Humbert - Simpla Workflows
body: Hi [@Zden?k Nov??ek](/t5/user/viewprofilepage/user-id/1215370) ! When it comes to card button actions, you can either copy the "trigger" card or create a new card. It doesn't look like it's possible to create an action that says "copy another specific card".   

However, when setting the action to create a new card, you can define in your command to add all of the things that are in your template card (checklists, labels, description, etc.)  

When it comes to taking a specific word or phrase from a trigger card and applying it to the "action" card, you can achieve this using [wildcards](https://help.trello.com/article/1156-pattern-matching-and-wildcards). The trigger needs to include a wildcard I believe, so I'm not sure you can use wildcards in card buttons. You can use it in a rule though. So if your command was to trigger based on a label application for example, rather than the click of a button, your rule could look something like this:  

```
When the "Copy" label is applied to a card with a name containing "TEST {*}", create a new card with title "{wildcard1}", with description "xxx", in list "X", and add the "X" checklist from card "Template", and link the cards together
```

<br />

The "name containing part" would contain the beginning of the card name which is always the same. So if the "trigger" card is called "TEST 12345", when applying the custom label to this card, a new card will be created called "12345" with all the predefined information.  

If you'd prefer to use the card button method, you just won't be able to use wildcards AFAIK.


author: Zden?k Nov??ek
body: Thank you for your answers, they put me on a right path which was successful. I am uploading screens bellow. I create multiple card from templates by clicking one button, then I connect them from the card that was clicked and finally rename the card if needed. Renaming the card had to be done by rules, separate from the button function.

Rename rule:

![Sni?mek obrazovky 2022-03-30 v?8.37.52.png](https://community.atlassian.com/t5/image/serverpage/image-id/190592i003018CDAD62EA75/image-size/large?v=v2&px=999 "Sni?mek obrazovky 2022-03-30 v?8.37.52.png")

Button function:

![Sni?mek obrazovky 2022-03-30 v?8.40.03.png](https://community.atlassian.com/t5/image/serverpage/image-id/190593i758934E92EAF281F/image-size/large?v=v2&px=999 "Sni?mek obrazovky 2022-03-30 v?8.40.03.png")