Archive Cards older than a particular age

David Pollard February 20, 2019

I have a trello list named "Completed"

Once a card in this list is older than 365 days I want to automatically archive it.

I have written this butlerbot command

every day at 3:00am, archive all the cards more than 365 days in list "Completed"

The command is accepted by butler but the result is always the same.

I archived 0 cards in list "Completed".

I'm sure there are cards older than this number of days in the list.

Once this is solved I want to create a command to automatically empty the archive that I can schedule to run once a week.  My goal being to run the first archive command say every Monday and then clear the archive the following Sunday.

Any Ideas?

 

1 answer

1 accepted

0 votes
Answer accepted
Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2019

@David Pollard to your first point, note that butlerbot is being phased out, so you should try and implement only commands using the power up.

However at any rate I don't think you can use time in list as a filter like that, you'd have to do something like:

for each card in list "Completed" if {carddaysinlist} is more than 365 archive the card

I can't test this as I no longer have a Butler account.

I also don't think the Butler power up can delete cards at all. You can delete cards with the bot though. The solution to deleting cards on the Butler Support board was to move them to another board first, then archive them, then have a bot command that deleted them on a schedule.

In your case, perhaps you could move the cards to another board instead of archiving them, that way you'd have a whole board just for archives, keeping your main board's archive clear (or you could periodically delete that board and create another one or something :)

Here's the support comment I'm talking about:

https://trello.com/c/yquk7Mnk/17-feature-requests#comment-5aa014143468a95ffadb6e6a

David Pollard February 20, 2019

Hi Lain,

Thanks for the speedy reply.

I have inherited a set of boards with lots of butler bots created by someone else.

Are there details somewhere on how I can convert these bots to power ups and what the shortcomings are? 

I had to delete 700+ cards one by one over a couple of days as the board was becoming unresponsive.  Extremely Painful on a board going slow.

I think I get what you are saying but seems crazy to have to need an "Archived" board then dump the board to clear the archive :)

It seems Trello is trying to protect us from accidentally deleting cards to the point where the boards are choked by their own archive, or lack of it if it is too difficult the users ignore the problem.  This board will have about 1000 new cards per year to manage a particular business process.  Automatically creating the cares is easy.  Getting rid of them is not.

I'll post again with any fancy commands I come up with ;)

David

Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2019

@David Pollard basically the message is "recreate your commands as power up commands, if you need help, email us". I'm not sure if the butler support email is still the same following acquisition but you can ask support@trello.com if that's the case.

More reading:

https://help.butlerfortrello.com/article/37-butler-bot-vs-power-up

If you want to keep using a bot, you can look at Trellinator which is a code framework in Google Apps Script with a "butler like" syntax (I wrote it to replace Butler Bot):

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

For example here is the code that does what you described above:

https://gist.github.com/iaindooley/54eed49157d54ca8452d59f678f7a384

Since I wrote Trellinator to replace Butler (and then ported the 1600 commands I'd written for my clients over to it) there is a clear migration path for all your bot functionality to Trellinator, even if you can't get the same exact functionality in the power up.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events