Skip to content

Daily

Archive old cards in your Done list

Cards that have sat in Done for two weeks are archived each night, and you get the list by email.

Runs
Daily
Apps
Trello
AI
Not needed
Access
read+write

Send this to your assistant

Create a ClickRuntime automation: every night, archive any card that has been in the Done list on my Sprint board for more than 14 days, and email me which cards were archived.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

The Done list on a busy Trello board keeps growing. After a few months it holds hundreds of cards, the board takes longer to load, and the actual work in progress is pushed off to the side. Teams either spend an afternoon archiving by hand every quarter, or leave the clutter because no single person owns the cleanup.

Every day, this lists the cards in your Done list, checks each one's last activity against a cutoff you choose, such as 30 days, archives the ones that are older and emails you the names of what it archived. Cards are archived, not deleted, so they can be restored from Trello's archive.

It is a good fit for sprint boards and content calendars with a steady flow of finished work. A steady daily trim beats a yearly purge, because nobody has to remember to do it.

What you get out of it

  • A board that stays fast and readable

    Removing finished cards after the cutoff keeps the board small. People can see work in progress at a glance, without scrolling past months of completed items to find the active ones.

  • Nothing is permanently lost

    Archived cards remain searchable and can be restored with their comments and checklists. You get the tidy board without the risk that comes with deleting someone's finished work. Restoring one takes a click in the board menu.

  • Cleanup stops depending on one person

    Housekeeping tasks without an owner never happen. A daily run means the Done list is trimmed steadily, instead of in a painful quarterly sweep that someone resents. The board stays tidy without anyone volunteering.

  • A list of what was archived

    The email names every archived card, so a teammate who is looking for a finished item knows when it left the board. It also lets you spot a card archived too early.

  • Grace period for late edits

    The cutoff is based on last activity, so a card that gets a comment last week stays on the board. Items are only cleared after they have truly been quiet for the whole period.

How it works

What happens, step by step

  1. Every day, ClickRuntime looks at the cards in your Trello Done list.

  2. It checks when each card was last moved or changed and picks out those older than your cutoff.

  3. Those cards are archived, so the Done list stays short.

  4. You get an email listing the cards it archived.

Before it runs live

  • Connect Trello

What you get

RunsDaily
Archive old cards in your Done listtoday, 9:00Succeeded
Email · Sprint cleanupArchived 6 done cards Fix invite email copy · Add CSV import · Upgrade Node to 22

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Trello steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
auto_archive_old_done_cards.pyexample
from datetime import datetime, timedelta, timezone
from clickruntime import on_trigger, http, credentials, notify

DONE_LIST_ID = "SPRINT_DONE_LIST_ID"

def trello(method, path, **params):
    params.update(key=credentials.secret("TRELLO_API_KEY"), token=credentials.secret("TRELLO_TOKEN"))
    r = http.request(method, f"https://api.trello.com/1{path}", params=params)
    r.raise_for_status()
    return r.json()

@on_trigger
def run(event):
    cutoff = datetime.now(timezone.utc) - timedelta(days=14)
    archived = []
    for c in trello("GET", f"/lists/{DONE_LIST_ID}/cards", fields="name"):
        moves = trello("GET", f"/cards/{c['id']}/actions", filter="updateCard:idList,createCard", limit=1)
        moved_at = datetime.fromisoformat(moves[0]["date"].replace("Z", "+00:00")) if moves else None
        if moved_at and moved_at < cutoff:
            trello("PUT", f"/cards/{c['id']}", closed="true")
            archived.append(c["name"])
    if archived:
        notify.email_me(f"Archived {len(archived)} done cards", "\n".join(archived))
    return {"archived": len(archived)}

FAQ

Common questions

Can I set a different number of days?
Yes. The cutoff is a setting, so you can choose 7 days for a fast-moving board or 90 for a slower one. Tell your AI assistant the number and approve the updated flow before it runs.
How do I get an archived card back?
Open the board menu in Trello, choose Archived items, and send the card back to the board. Its comments, checklists and attachments are preserved, because archiving only hides the card. Archiving never deletes anything. Nothing is lost.
Does it touch cards in other lists?
No. It only looks at the Done list you name, and cards elsewhere on the board are never archived. If you have several finished lists, such as Shipped and Done, list each of them. Other lists are never touched.
What permissions does it need?
read+write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Archive old cards in your Done list” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.