Weekly
Track what Atlas is costing this month
Once a week you see the running total of your pending Atlas invoice and its biggest line items.
- Runs
- Weekly
- Apps
- MongoDB
- AI
- Not needed
- Access
- Organization Billing Viewer
Send this to your assistant
Create a ClickRuntime automation: every Friday, email me my MongoDB Atlas pending invoice total for this month and the five largest line items.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Atlas bills usage across clusters, data transfer, backups and extras like Atlas Search, and the total only becomes clear when the invoice is issued. A developer who scaled a cluster to M30 for a load test and forgot to scale it back sees the cost on the first of next month. Founders and finance leads then ask why the database line grew 40 percent, and nobody can say which item caused it.
On a weekly schedule ClickRuntime fetches the pending invoice for your Atlas organization, reads the running total and the line items, and emails them. You see the month so far, with each cluster and charge type, while there is still time to change something.
Finance contacts and engineering leads who share responsibility for infrastructure spend usually receive it.
What you get out of it
Surprises are caught mid-month
Seeing the total in week two rather than after billing lets you act on the oversized cluster. A forgotten M30 costs about a week of fees to find, not a month.
Line items explain the cost
The email lists charges by type, such as cluster compute, backup storage and data transfer. You know which one grew, which turns a vague complaint into a specific fix. Knowing which charge grew, such as backup storage or data transfer, turns a vague complaint into a specific fix.
Finance sees it without logging in
Bookkeepers and founders get the figures without an Atlas account or role. That avoids granting billing access just so someone can check a number. Bookkeepers and founders see the figures without needing an Atlas account, and nobody has to hand out billing roles just for a number.
Budget tracking becomes routine
A weekly figure builds an easy running history of spend. Comparing week three of this month with last month shows whether you are on track. Comparing week three of this month with week three of last month shows whether you are on track.
Fewer end-of-month arguments
When everyone has seen the cost growing, the invoice is expected. Discussions move to whether the spend is worth it, not who is to blame. Discussion moves to whether the spend is worth it, because everyone has watched it build.
How it works
What happens, step by step
Every week ClickRuntime gets your MongoDB Atlas invoice for the current month so far.
It reads the running total and the biggest line items.
Both arrive in your inbox, so the end-of-month bill isn't a surprise.
Before it runs live
- Connect MongoDB
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 MongoDB steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, notify
from requests.auth import HTTPDigestAuth
ATLAS = "https://cloud.mongodb.com/api/atlas/v2"
def atlas(path, **params):
auth = HTTPDigestAuth(credentials.secret("ATLAS_PUBLIC_KEY"), credentials.secret("ATLAS_PRIVATE_KEY"))
resp = http.get(f"{ATLAS}{path}", auth=auth, params=params, headers={"Accept": "application/vnd.atlas.2024-08-05+json"})
resp.raise_for_status()
return resp.json()
ORG_ID = "your-atlas-org-id"
@on_trigger
def run(event):
invoice = atlas(f"/orgs/{ORG_ID}/invoices/pending")
items = sorted(invoice.get("lineItems", []), key=lambda li: -li["totalPriceCents"])[:5]
lines = [f"{li.get('clusterName') or '-'} {li['sku']}: ${li['totalPriceCents'] / 100:,.2f}" for li in items]
notify.email_me(f"Atlas pending invoice: ${invoice['amountBilledCents'] / 100:,.2f}", "\n".join(lines))
return {"total": invoice["amountBilledCents"] / 100}FAQ
Common questions
Does it show a forecast for the whole month?
What access does the API key need?
Does it handle several organizations or currencies?
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 open Atlas alerts every morning
Each morning one email lists every alert still open across your Atlas projects.
See how it worksKeep a weekly list of your Atlas clusters
Every Monday you get each cluster's project, tier, MongoDB version and state in one table.
See how it worksGet warned when a cluster backup is missing
You hear about any backed-up cluster whose newest snapshot failed or is more than a day old.
See how it worksKeep exploring
Set up “Track what Atlas is costing this month” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.