What is the 'Trello Attachment' variable?
Asked by Ayesha A:

I have a workspace for an Animal Shelter I'm working with. We have 3 boards

1. Animals - board to manage all the shelter residents and fostered pets
2. Volunteers - board to manage all the volunteers and if they can be pet transporters
3. Adoption Days - board to manage all the upcoming adoption days, figure out the pets that will be there and the volunteers available

I have setup a few automatons to add any card with a particular adoption day label in the Animals and Volunteers to that specific adoption day card. This basically means that the linked cards (volunteers and animals) are going to be at the adoption day.

**To make this easier to manage I want to add all the Animal cards linked to a checklist. I have tried using the {attachmentlink} and the {attachmentname} variables, but they don't seem to work. ++Please advise if there is a variable to manage the Trello Attachments linked on a card.++**


Answers:
author: Dreamsuite Mike
body: Hi Ayesha,

I think I understand what you are looking for, to get a card linked into a checklist you can use the automation function for "Collect all cards with \[your specific conditions\] into linked items in checklist..."  
You can find this at the bottom of the Cascade section of the automation.

If you are using variables you want to use "triggercardlink" and "foundcardlink" variables.

As an example you could do, "on the day a card is due lookup the card named "example1" and add the item {foundcardlink} to checklist "\[checklistname\]

comments: author: Ayesha A
body: Hi [@Dreamsuite Mike](/t5/user/viewprofilepage/user-id/5153180)

Thanks for the prompt response. We are halfway there, basically the issue now is that with the two variables you mentioned, it's adding all of the cards on that board as link to the checklist. I only want the linked card to be added as a checklist.

So if I label Noodle the Golden Doodle dog from the Shelter Residents board with the specific adoption day then:

1. That specific adoption day card should get Noodle's card linked to it
   1. This is done and working
2. Add Noodle's card link to the checklist called "Pets and Transport List" on the Adoption Day card
   1. This isn't working


author: Ayesha A
body: Hey [@Dreamsuite Mike](/t5/user/viewprofilepage/user-id/5153180) - THANK YOU SO MUCH --- it worked. I ended up making this rule

```
when any label is added to a card, find a card titled "{labelname}" on board "Adoption Days", and add item "{triggercardlink}" to checklist "Pets and Transport List"
```

Thank you also for introducing me to the trigger and found variable additions as that enabled me to resolve a lot of my other blockers.


author: Dreamsuite Mike
body: Just caught up with this. I'm glad you managed to figure it out [?](https://emojipedia.org/smiling-face-with-smiling-eyes/)


author: Vongsawat
body: The rule that links the cards together (which is triggered by applying a label), just has to add itself to the target (adoption day) card's checklist.

You first jump to the adoption day card (using Find by link or by card name), then you add a checklist item {triggercardlink} to the "Pets and Transport List" checklist. That should solve your problem.

*** ** * ** ***

Also, if you have cards linked in attachments. There is a Cascade Rule "For each card linked in the attachments". But that jumps you to each of the linked cards to do something. Which isn't exactly what you want, so modifying the rule that's currently linking your cards together (the above) is a much easier way.

EDIT: woop, seems like you figured it out just before I hit send lol


Tags: attachment

automation

link

variable