Skip to content

Weekly

Get a weekly Neon usage report

Each Monday you see compute hours and storage for every Neon project in one email.

Runs
Weekly
Apps
Neon
AI
Not needed
Access
org/project API key (read)

Send this to your assistant

Create a ClickRuntime automation: every Monday at 9am, email me the compute hours and storage used by each of my Neon projects over the last week.

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

Neon bills on compute hours and storage, and both can grow without anyone deciding to grow them. A staging database left on autoscaling, a branch that holds a large import, or a project whose endpoint never suspends can double the monthly bill. Usually the first sign is the invoice, and by then the cause is a month old and nobody remembers which project it was.

Every week ClickRuntime lists your Neon projects, reads their consumption metrics for compute time and storage, and emails a table with one row per project. The comparison with earlier weeks makes changes stand out, so you see which database is driving usage while the details are still fresh.

Founders and engineering managers who pay the Neon bill themselves find it especially handy. Some teams also forward it to the person who approves software spend.

What you get out of it

  • Cost growth is spotted early

    A project using twice last week's compute hours is visible within seven days. You can investigate an endpoint that never suspends before it costs a full billing month. You can then investigate an endpoint that never suspends before it costs a full billing month.

  • Each project is accountable

    With usage listed per project, you can tell whether the growth is in the production database or in a side experiment. Owners can then be asked about their own numbers.

  • Capacity planning uses real figures

    Storage trends across several weeks show when you will need a larger plan. You upgrade deliberately instead of being surprised by a limit. You upgrade deliberately, with figures in hand, rather than learning of a limit from an error.

  • Finance gets numbers without logins

    A founder or bookkeeper receives the report without needing a Neon seat. Questions about why the database costs more get answered from the email. A founder or bookkeeper can answer why the database costs more from the email alone.

  • Idle projects are found

    A project with near-zero compute and some storage is a candidate for deletion. Weekly reports make abandoned prototypes visible instead of letting them linger for a year. Weekly figures make abandoned prototypes visible rather than letting them linger for a year.

How it works

What happens, step by step

  1. Every Monday ClickRuntime lists your Neon projects.

  2. It reads each project's compute hours and storage.

  3. The figures arrive in your inbox, one line per project.

Before it runs live

  • Connect Neon

What you get

RunsWeekly
Get a weekly Neon usage reporttoday, 9:00Succeeded
Email · Neon usageacme-api: 41.3 compute hours, 312 MB storage acme-staging: 6.2 compute hours, 48 MB storage

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 Neon 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.
get_a_weekly_usage_report.pyexample
from clickruntime import on_trigger, credentials, http, notify, state

NEON = "https://console.neon.tech/api/v2"

def neon(method, path, **kwargs):
    resp = http.request(method, f"{NEON}{path}", headers={"Authorization": f"Bearer {credentials.secret('NEON_API_KEY')}"}, **kwargs)
    resp.raise_for_status()
    return resp.json()

@on_trigger
def run(event):
    last = state.get("compute") or {}
    now, lines = {}, []
    for p in neon("GET", "/projects")["projects"]:
        now[p["id"]] = p.get("compute_time_seconds", 0)
        week = now[p["id"]] - last.get(p["id"], 0) if now[p["id"]] >= last.get(p["id"], 0) else now[p["id"]]
        lines.append(f"{p['name']}: {week / 3600:,.1f} compute hours, {p.get('synthetic_storage_size', 0) / 1e6:,.0f} MB storage")
    notify.email_me("Neon usage last week", "\n".join(lines))
    state.set("compute", now)
    return {"projects": len(lines)}

FAQ

Common questions

Which metrics are included?
Compute time and storage consumption per project as exposed by Neon's consumption API, for the billing period and the week. Metrics available depend on your Neon plan, and the email shows what the API returns.
Can I report only one project or organization?
Yes. You can limit the report to named projects or to those in one organization, so a client's databases are reported separately. List the projects when setting it up. Either way each project appears as its own row.
Does it need an API key with write access?
No. A Neon API key is needed to read projects and metrics, and the automation only performs read requests. The key is stored as a secret and never appears in the email. Only read requests are made, and no change is possible.
What permissions does it need?
org/project API key (read). 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 (weekly). 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 “Get a weekly Neon usage report” from your assistant

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