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.
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
Every Sunday at 11pm, ClickRuntime reads your Coda tasks table.
It picks out rows marked Done more than 30 days ago.
Before removing anything, it emails you their full details as a backup.
Then it deletes those rows from the table in one go.
Before it runs live
- Connect Coda
What you get
Build your own
Need it to work differently?
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
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?
How does it decide a row is Done?
Are the deleted rows really recoverable?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get your open Coda tasks each morning
Every morning one email lists the tasks in your table that aren't done yet.
See how it worksGet an email for each new Coda row
Within minutes of a row being added to your table, its values arrive in your inbox.
See how it worksPost edited Coda rows to Slack
When someone changes a row in your projects table, the updated row shows up in your Slack channel.
See how it worksKeep exploring
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.