Skip to content

Every 30 minutes

Categorise bank statement transactions into Supabase

Drop a bank statement CSV into Drive and each transaction is sorted into your own categories and saved to your Supabase database.

Runs
Every 30 minutes
Apps
Google Drive, Supabase
AI
Yes, uses the built-in AI allowance
Access
Drive read; Supabase write

Send this to your assistant

Create a ClickRuntime automation: when a new CSV appears in my Drive 'Statements' folder, categorise each transaction with AI using my categories table in Supabase and insert them into the 'transactions' table.

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

A freelancer downloads her bank statements each month and spends an evening tagging every line as software, travel, client income or personal so she can see her spending and prepare for her tax return. Her bank's own categories are too vague, and the spreadsheet she keeps grows harder to manage.

Sorting each transaction into your own categories as soon as the statement is saved, and storing it in a database you control, gives you an accurate picture of where money goes. Freelancers, small business owners and developers building their own finance dashboards use it to keep their books current with one file drop.

What you get out of it

  • Your categories, not the bank's

    Transactions are sorted into the categories you keep in Supabase, so reports match how you think about your money.

  • Month-end bookkeeping in minutes

    Dropping the CSV in a folder is the only manual step. The categorised transactions are ready to review.

  • Data you own and can query

    Everything lands in your own database, ready for dashboards, tax summaries or your own tools.

  • Consistent categorisation

    Similar transactions are labelled the same way each month, which makes month-to-month comparisons reliable.

How it works

What happens, step by step

  1. Every few minutes ClickRuntime checks your Drive Statements folder for new CSV files.

  2. It skips any file it has already processed.

  3. It reads your list of categories from Supabase, and AI assigns one to each transaction.

  4. Every transaction is saved to your transactions table with its date, description, amount and category.

Before it runs live

  • Connect Google Drive
  • Connect Supabase

What you get

RunsEvery 30 minutes
Categorise bank statement transactions into Supabasetoday, 9:00Succeeded
Supabase · transactions2026-10-03 | Northwind Cloud hosting | -49.00 | Software · 2026-10-04 | Acme Ltd payment | 2,400.00 | Client income

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

  • Act only on the items that match your own rules, and skip the rest
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Google Drive and Supabase 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.
categorise_bank_statements_dropped_in_drive_into_supabase.pyexample
import csv, io
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, ai, report_fetched

FOLDER_ID, SUPABASE = "your-statements-folder-id", "https://yourproject.supabase.co"

@on_trigger
def run(event):
    drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    seen = set(state.get("seen") or [])
    files = drive.files().list(q=f"'{FOLDER_ID}' in parents and mimeType='text/csv' and trashed=false", fields="files(id,name)").execute()["files"]
    new = [f for f in files if f["id"] not in seen]
    report_fetched(len(new))
    if not new:
        return {"summary": "Nothing new"}
    key = credentials.secret("SUPABASE_SERVICE_KEY")
    sb = {"apikey": key, "Authorization": f"Bearer {key}"}
    cats = [c["name"] for c in http.get(f"{SUPABASE}/rest/v1/categories", headers=sb, params={"select": "name"}).json()]
    for f in new:
        rows = list(csv.DictReader(io.StringIO(drive.files().get_media(fileId=f["id"]).execute().decode())))
        for i in range(0, len(rows), 50):
            batch = rows[i:i + 50]
            listing = "\n".join(f"{n + 1}. {r['Description']} {r['Amount']}" for n, r in enumerate(batch))
            labels = ai.generate(f"Categories: {', '.join(cats)}\nGive one category per line for:\n{listing}", max_output_tokens=600).text.splitlines()
            http.post(f"{SUPABASE}/rest/v1/transactions", headers=sb, json=[{"date": r["Date"], "description": r["Description"], "amount": float(r["Amount"]),
                      "category": (labels[n].split(". ", 1)[-1].strip() if n < len(labels) else "Uncategorised")} for n, r in enumerate(batch)])
        seen.add(f["id"])
    state.set("seen", list(seen)[-500:])
    return {"files": len(new)}

FAQ

Common questions

Which banks' CSV files work?
Most banks export a CSV with date, description and amount columns. You tell it which columns to read once, and every statement from that bank works the same way.
What if a transaction does not fit any category?
It is saved with the category Uncategorised so you can review it. Adding a new category to your categories table makes it available for the next statement.
Will transactions be added twice if I upload an overlapping statement?
Each file is processed once. If two statements cover the same days, a unique rule on date, amount and description in your table stops duplicate rows.
What permissions does it need?
Drive read; Supabase write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new 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 “Categorise bank statement transactions into Supabase” from your assistant

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