# Monthly MongoDB Atlas cluster cost review posted to Slack

> On the first business day of each month, see exactly which database clusters drove your bill, what changed, and where you can safely cut spend.

- Workflow type: agent
- Services: MongoDB Atlas, Google Sheets, Slack Bot
- Categories: Engineering, Finance
- Published: 2026-08-07

## What it does

- Pulls this month's and last month's database bills and breaks the total down by cluster and by charge type, so you can see exactly where the money went.
- Labels every cost line with the cluster's real size and region, then flags clusters that are paused, sitting idle, or far bigger than their workload needs.
- Adds one row per cluster per month to a spreadsheet, so you build a spend history you can chart over time.
- Posts a written review to your team channel covering total spend, the change versus last month, the top three cost drivers, and specific ways to cut the bill.

## What you'll need

- A MongoDB Atlas account with billing access for your organization
- A Slack workspace and the channel you want the review posted to
- A Google account and a spreadsheet with a tab for the running spend history

## Prompt

On the first business day of every month at 8am, review our MongoDB Atlas spend and post a written cost review to Slack. Use a cron trigger. Because cron cannot express "first business day" on its own, schedule it for the 1st, 2nd, and 3rd of each month at 8am and stop immediately unless today is actually the first business day of that month, skipping weekends.

Start with MongoDB Atlas List Organization Invoices for my organization to find the invoice covering the month that just ended and the invoice for the month before it. Then call Get Organization Invoice for each of those two invoice ids to pull the full line items. Atlas returns every invoice amount in cents (USD), so divide by 100 and format as dollars before reporting any number.

Break the line items down two ways: by cluster, using the clusterName field on each line item, and by SKU, so I can see which clusters drive spend and what kind of charge each one is (instance hours, backup, data transfer, and so on). Any line item with no cluster name goes into an "organization level / unattributed" bucket rather than being dropped.

Cross-reference every cost line against the real cluster. Call List Projects in Organization to get the project ids, then for each project call List Clusters and List Flex Clusters. Match on cluster name and label each cost line with that cluster's actual tier or instance size, cloud provider, region, and current state. Call out clusters that are paused but still costing money, clusters that look idle, and clusters that look oversized relative to what they cost.

Compare each cluster's cost this month against last month and flag any cluster that grew more than 20 percent, showing both dollar amounts alongside the percentage so the size of the jump is obvious.

Append one row per cluster per month to the tracking tab of my Google Sheets spend history spreadsheet using Append Values. Each row should carry: month, project name, cluster name, tier or instance size, cloud provider, region, cluster state, total cost in dollars, prior month cost in dollars, percent change, and the largest SKU for that cluster. Before appending, read the tab with Get Values and skip any month and cluster combination that is already recorded, so a re-run never creates duplicate rows.

Finally, post the review to our #eng-costs channel using Slack Bot Send a Message. Use the slackbot integration rather than the user-level Slack one. Cover total spend for the month in dollars, the month-over-month change in dollars and percent, the top three cost drivers with what each one costs, every cluster flagged for growing more than 20 percent, and concrete right-sizing recommendations such as which tier to drop to, which paused or idle cluster to remove, and where backup retention could be reduced. Write it as prose a non-engineer can follow, not a raw data dump, and keep it short enough to read comfortably in the channel.

## How to customize

- Change when it runs, for example the first Monday of the month or once a quarter instead.
- Point it at a different channel, or send it as a direct message to whoever owns the budget.
- Adjust the growth threshold so a cluster gets flagged at 10 percent instead of 20 percent.

## FAQ

### Will this change anything in my databases?

No. It only reads billing and cluster information, then writes to your spreadsheet and posts to Slack. It never resizes, pauses, or deletes a cluster.

### Does it work if I have several projects in one organization?

Yes. It looks across every project in the organization, so a cluster in any project still shows up in the breakdown with its real size and region.

### Does it cover flex clusters as well as regular ones?

Yes. It checks both standard and flex clusters so every cost line can be matched back to a real cluster instead of showing up as an unlabelled charge.

### Why does the first report have no comparison?

Comparing month over month needs two bills. The first run reports current spend, and from the second month onward you get the change versus last month plus the growth flags.

### Do I need to be technical to read the review?

No. The summary is written in plain language with the total, what changed, the top three cost drivers, and clear recommendations you can act on.

Use this prompt in General Input: https://www.generalinput.com/prompts/monthly-mongodb-atlas-cluster-cost-review-posted-to-slack