Butler: Is there a way to move *the last* list to another board
Asked by Tim Diggins:

I regularly need to move a few lists from the end of one board to the beginning of another board (e.g. current board --\> archive board, or (less often) backlog board --\> current board).

I thought I could \~automate\~ make a Board button for this using Butler, but it seems like the only way to move a list is to specify its exact name.

Is there any way (or suggested workaround) for doing this?


Answers:
author: Iain Dooley
body: [@Tim Diggins](/t5/user/viewprofilepage/user-id/3898854) I think the only way to do this with a board button, would be to use the board button to create a card with a specific title then use that as a trigger to an API function to move the last list on the board to another board.

So in the case of archive for example, if you have a board button that creates a board called "Archive Last List" in your "To Do" list, then this Trellinator function would archive the card you created and move the last list on the current board, to your archive board:

<https://gist.github.com/iaindooley/cd55f01b2a4b21980b3590f895cff834>

You can read more about Trellinator here:

<https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Introducing-Trellinator-Automate-Trello-with-Google-Apps-Script/ba-p/925271>

comments: author: Tim Diggins
body: Wow [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) nice framework - the gist is very readable. I had no idea that GAS could work like this (I've only used it internally to google sheets to date). Your post on Trellinator blew my mind - I will have to read through.

This reminds me a bit of [glitch](https://glitch.com/) if I recall it correctly. Is that another alternative?

I'm still weighing up how much automation is going to help me vs be a wonderful time sink...


author: Iain Dooley
body: [@Tim Diggins](/t5/user/viewprofilepage/user-id/3898854) thanks, I actually based this work on this:

<http://www.littlebluemonkey.com/blog/pimp-your-trello-cards>

I used the same approach for the first versions of BenkoBoard and BenkoDesk (although I've rewritten both as web apps now).

The only drawback is that the setup is pretty cumbersome, and from the number of failed queries I see on the buffer many people are trying and failing daily.

I'm in the process of putting together a hosted version at benkobot.com which will be a bit like glitch or wayscript but dedicated to automating Trello (kind of picking up where Butler Bot left off when they moved to "no code").


author: Papick G. Taboada
body: I think many teams would need this option, it looks like overkill to use GAS or API to do that.  

All we need is a "last list" option, moving to other boards is already there.


author: Iain Dooley
body: [@Papick G. Taboada](/t5/user/viewprofilepage/user-id/895679) I have actually released a platform to run Trellinator code without the need for GAS called BenkoBot:

<https://app.benkobot.com/>

Makes it much easier to do these types of API automations. You can save your "adhoc" functions for re-use, similar to a board button.


author: Robin Moore
body: When you create the lists that will be moved later, use an indicator at the end of the list name, e.g. "Completed #", then use "{\*}#" as the list name to move in the board button. You can even use extended characters/emojis in the list name (e.g. ?) to make it more clear.


author: vinc
body: I need this as well.

Not from a button, but just every day, i want to move the righternmost list to a different board.

All I would need is for butler to have the option to have the select options \[list in the top position\] and \[list in the bottom position\] when selecting a list to perform archive Action.

So, the exact same options it has for moving a list.

comments: author: milynnus
body: [@vinc](/t5/user/viewprofilepage/user-id/3635795) (my earlier reply had gone missing)

Just finished a module to do just that on Superhero Power (<https://www.notion.so/Superhero-Power-ac42df32932f423fbbe2d60cf2d0dbab>)

and the module description is here (top of list): <https://www.notion.so/Superhero-Power-Modules-f4e2a0848bc24c0f85f42a78a218408f>

This is an example how I would use it.

```
when custom field "Checkbox" is set, post to url "https://25368.wayscript.io/butler/?registry=<registry_id>&module=5ff53dc468d3d26dff1ade28" with payload "{ \"board_id\" : \"{boardid}\"}", collect all cards in list "{httpresponse.rightmost}" with an incomplete checklist into links in checklist "cards_to_move" using pattern "[{cardname}]({cardlink})", for each checklist item in a checklist named "cards_to_move", move the card to the top of list "? New leads" on board "Test Board"
```

The http request can be initiated from anywhere with Butler where it is available.


author: milynnus
body: [@vinc](/t5/user/viewprofilepage/user-id/3635795) \*\* removed \*\*


author: milynnus
body: If Butler can't then you need a automation tool to monitor the board activities. Question is what is that event and how to know which lists need to move and the target board and default pos of the lists.

comments: author: Tim Diggins
body: Sorry, I've edited my question to clarify. I wanted to make a board button to automate this (move last list to another board). It's not to be automated on a specific event.


Tags: butler