I want to have all linked and related cards move as a group so that if one card is moved from a list to another, the other cards follow. I have gotten as far as moving all related cards, but the only options in the "automate" creator are for specific lists or boards.
Edit: I tried the code in the answer, but it does not seem to be working as intended. Here is the rule I created, after first trying it with the {} brackets:
when a card is moved out of list "listname" by anyone, for each card linked in the attachments, move the card to the top of list "triggercardlistname"