Skip to content

On a schedule

Clear out finished Coda tasks every week

Rows marked Done over 30 days ago are removed each week, and you get an email listing exactly what went.

Runs
On a schedule
Apps
Coda
AI
Not needed
Access
read+write

Send this to your assistant

Create a ClickRuntime automation: every Sunday at 11pm delete rows in the Tasks table of my Coda doc where Status is Done and Completed Date is more than 30 days ago, and email me a list of the deleted rows first.

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

Tracker tables in Coda fill up with finished work. A task table that started with fifty rows is soon at six hundred, with years of Done items slowing every filter and burying the open work. Nobody wants to delete rows by hand, and nobody is sure they are allowed to.

Every week, this finds rows marked Done more than 30 days ago, emails you a list of their values as a backup, and only then deletes them in one bulk call. You keep a record of what was removed, and the table stays small without anyone doing cleanup.

It fits project trackers, request queues and content calendars where completed rows have no ongoing value but a short audit trail is useful. The cleanup follows a rule you choose, using the status and date columns of your own table, so nothing is removed that you would not expect to be removed.

What you get out of it

  • Keep the table fast and readable

    Smaller tables load faster and filter views stay meaningful. Staff stop scrolling past hundreds of finished items to find what still needs attention. Fewer rows mean faster views and filters, and your team can find open work without scrolling past a year of finished items.

  • Stay under Coda's row limits

    Large docs can slow down or hit size constraints. Removing old finished rows regularly keeps the doc healthy long before it becomes a problem. Large Coda docs get slower and can reach size limits, and a steady cleanup keeps the doc healthy long before that point.

  • Keep an emailed backup before deleting

    Because the email is sent before the rows are deleted, you can restore anything removed in error. Cleanup stops being a risky one-way action. A list of every removed row arrives before the deletion happens, so a row removed by mistake can be typed back in.

  • Take away a recurring chore

    Pruning a table by hand is dull work that gets postponed. A weekly run gives a steady rhythm so cleanup never builds into a day-long task. Hand-pruning is a chore that gets postponed until it takes an afternoon, and a weekly run keeps it from ever becoming one.

  • Create a thirty-day grace window

    Rows stay visible for a month after completion, long enough to answer questions or reopen them. Only after that do they leave the table. Finished work stays visible for a month, which is long enough to answer questions or reopen an item before it leaves the table.

How it works

What happens, step by step

  1. Every Sunday at 11pm, ClickRuntime reads your Coda tasks table.

  2. It picks out rows marked Done more than 30 days ago.

  3. Before removing anything, it emails you their full details as a backup.

  4. Then it deletes those rows from the table in one go.

Before it runs live

  • Connect Coda

What you get

RunsOn a schedule
Clear out finished Coda tasks every weektoday, 9:00Succeeded
Email · Deleting 12 old Done rows from TasksOrder new badges | Status: Done | Completed Date: 2026-08-29 | Owner: Sam Lee

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 Coda 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.
clean_out_old_done_rows_on_a_schedule.pyexample
from datetime import date, timedelta
from clickruntime import on_trigger, notify, http, credentials

DOC, TABLE = "AbCDeFGH", "Tasks"  # your doc id and table

@on_trigger
def run(event):
    url = f"https://coda.io/apis/v1/docs/{DOC}/tables/{TABLE}/rows"
    headers = {"Authorization": "Bearer " + credentials.secret("CODA_API_TOKEN")}
    rows = http.get(url, headers=headers, params={"useColumnNames": "true", "valueFormat": "simple", "query": 'Status:"Done"', "limit": 500}).json()["items"]
    cutoff = (date.today() - timedelta(days=30)).isoformat()
    old = [r for r in rows if (r["values"].get("Completed Date") or "9999")[:10] < cutoff]
    if not old:
        return {"deleted": 0}
    backup = "\n".join(f"{r['name']} | " + " | ".join(f"{k}: {v}" for k, v in r["values"].items()) for r in old)
    notify.email_me(f"Deleting {len(old)} old Done rows from Tasks", backup)
    http.delete(url, headers=headers, json={"rowIds": [r["id"] for r in old]}).raise_for_status()
    return {"deleted": len(old)}

FAQ

Common questions

Can I change the 30 day cutoff?
Yes. Say you want 14 days or 90 days and your AI assistant will update the filter. The new logic is shown for approval before it replaces the current schedule. Any number of days will do, such as 14 or 90.
How does it decide a row is Done?
It checks the status column you name for the value Done and uses a date column to measure age. Both column names are part of the setup, so it works with whatever your table uses. You name the status column and the date column once, so the same approach works for whatever your own table calls them.
Are the deleted rows really recoverable?
The email lists the values of every row before deletion, so you can re-enter them. The delete itself is permanent in Coda, so keep the emails if you may need to restore rows later. Coda does not keep deleted rows for you in this flow, so the emailed list is your only copy and is worth keeping for a while.
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 (on a schedule). 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 “Clear out finished Coda tasks every week” from your assistant

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