Daily Neon spend forecast with Linear and Slack alerts

By General Input

Every morning, see where your Neon database spend will land by month end and get alerted with the exact projects driving it, well before the invoice arrives.

Integrations

  • Neon
  • Linear
  • Slack

Type

Agentic Task

Categories

  • Engineering
  • Finance

Every morning at 7am, check whether my Neon spend is on track for the month and escalate before the invoice surprises me. I want to hear about a cost overrun while I can still do something about it, not when the bill lands.

Start with Neon List projects to enumerate every project on my account, then build a month to date picture with Retrieve project consumption metrics for the current billing period. If my account is on a legacy Scale, Business, or Enterprise plan, use Retrieve project consumption metrics (legacy plans) instead, so this works whichever plan I am on. Pull Retrieve branch consumption metrics for the per branch detail, and use Retrieve project details where you need a project's retention settings and compute configuration to interpret what you are seeing.

Project the month end total from the current run rate: take the spend so far, divide by the days elapsed in the billing period, and extend it across the full period. Report the month to date figure, the projected month end figure, and how both compare against my budget threshold of $500 per month. Treat that threshold as the number I am most likely to want to change, so make it easy to adjust.

When you work out what is driving the growth, do not simply rank by the largest absolute numbers. Neon's usage breaks compute down by branch, so the thing worth flagging is an individual branch showing far more active compute hours than its age would suggest. A two day old preview branch burning compute like a long lived production branch is the real signal, and it will be invisible in a plain top ten list. Compare each branch's compute against how long that branch has existed, call out the outliers relative to branch age, and report those alongside the largest absolute consumers. Say explicitly which projects and branches account for the increase compared with earlier in the month.

If the projected month end total crosses my budget threshold, create a Linear issue with Create Issue containing the full breakdown: month to date spend, projected month end total, how far over budget that lands, the top offending projects, and the branch level outliers with their age and their compute hours.

Before filing anything, use Linear Search Issues to find previous alerts raised by this workflow, so I am not handed an identical ticket every single day. Only create a new issue when the situation is newly over threshold, meaning the previous run was under budget or there is no open alert, or when it has materially worsened since the last one. Treat materially worsened as the projected total rising more than 10 percent since that issue was filed, or a project or branch newly entering the top offenders. If an open alert already exists and nothing has meaningfully changed, add a short comment to that existing issue with the updated numbers rather than opening a new one.

Then post a short Slack alert with Send a Message to my engineering channel, linking to that Linear issue. Keep it to a few lines carrying only the numbers that matter: month to date spend, projected month end total, how far over budget that is, and the single biggest driver. No preamble, no full table, because the detail belongs in the Linear issue.

If the projection is comfortably under my budget threshold, do nothing and stay silent. This workflow reports and escalates only. It must never delete, suspend, or otherwise modify any branch, compute endpoint, or project, even when a branch is obviously wasteful. Recommending that I clean something up is welcome, doing it for me is not.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes