Skip to content

Every 6 hours

Get warned when your bill goes over budget

One message the first time this month's usage passes the amount you set, and no repeats until next month.

Runs
Every 6 hours
Apps
DigitalOcean
AI
Not needed
Access
billing:read

Send this to your assistant

Create a ClickRuntime automation: every 6 hours check my DigitalOcean month-to-date usage and send one Slack message to #infra when it passes $50 this month.

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

Someone spins up a GPU Droplet for an experiment on a Thursday, and by Sunday the account has run up three days of charges nobody planned for. A personal project with a $50 budget can easily turn into $180 when a database cluster is left running. DigitalOcean's invoice shows the damage after the month ends, which is when it is too late to do anything but pay.

Every six hours the automation reads the account's month-to-date usage and compares it with the limit you picked, such as $50. The first time it crosses, you get an alert with the current figure; after that it stays quiet until the next month, so you are warned once instead of being nagged every six hours.

It is useful for hobbyists, students on credits, and teams whose projects have a fixed hosting allowance.

What you get out of it

  • The overrun stops at day three

    A six-hour check means you learn about a runaway resource within hours. Deleting it then costs a few dollars rather than a month of charges, and that difference can be the entire cost of the experiment you were running.

  • Budget limits that are actually watched

    A number written in a planning document does not stop anything. An alert that fires when the account crosses it gives that number some teeth, and it helps teams hold each other to a shared allowance without a monthly argument.

  • One alert, not a flood

    Because it alerts once per month, the email still means something when it arrives. An inbox full of repeats trains people to ignore the warning, while the one email you get stays noticed because it is rare.

  • Protection for credit-funded accounts

    If you are running on startup credits or a grant, a fast warning means you do not exhaust the credit before you notice. Credits are often the whole budget for a young project, and running out silently means a card on file.

  • Peace of mind for side projects

    You can leave a personal Droplet running without wondering whether you will be billed an unpleasant amount, because the limit is watched for you. That freedom matters for hobby work that you only touch on weekends.

How it works

What happens, step by step

  1. Every six hours ClickRuntime checks your DigitalOcean usage for the month so far.

  2. It compares it with the amount you set.

  3. The first time usage goes over, your Slack channel gets one message with the current total. You won't hear again until next month.

Before it runs live

  • Connect DigitalOcean

What you get

RunsEvery 6 hours
Get warned when your bill goes over budgettoday, 9:00Succeeded
Slack · #infraDigitalOcean usage passed $50: $51.08 so far in 2026-10

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 DigitalOcean 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_alerted_when_the_bill_passes_a_threshold.pyexample
from datetime import date
from clickruntime import on_trigger, credentials, http, notify, state

DO = "https://api.digitalocean.com/v2"

def do(method, path, **kwargs):
    resp = http.request(method, f"{DO}{path}", headers={"Authorization": f"Bearer {credentials.secret('DIGITALOCEAN_TOKEN')}"}, **kwargs)
    resp.raise_for_status()
    return resp.json() if resp.content else {}

THRESHOLD = 50

@on_trigger
def run(event):
    usage = float(do("GET", "/customers/my/balance")["month_to_date_usage"])
    month = date.today().strftime("%Y-%m")
    if usage > THRESHOLD and state.get("alerted_month") != month:
        notify.slack(f"DigitalOcean usage passed ${THRESHOLD}: ${usage:,.2f} so far in {month}", channel="#infra")
        state.set("alerted_month", month)
    return {"usage": usage}

FAQ

Common questions

Does it stop or delete anything when the limit is passed?
No. It only sends an alert, so the Droplet keeps running until you act. Deciding what to shut down stays with you, which avoids deleting a production server because of a temporary spike. The email shows the current month-to-date figure so you can judge how serious the overrun is.
Why check every six hours instead of continuously?
DigitalOcean's usage figure updates periodically, not by the second, so checking more often would not be more accurate. Six hours is frequent enough to catch a runaway resource the same day while keeping the number of runs low, and the interval can be shortened if you want faster warnings.
Can I set several thresholds, such as $50 and $100?
Yes. Each threshold can be tracked separately so you get one alert per level per month, for example an early warning at $50 and an urgent one at $100. Tell your AI assistant to add the second level, and the later alert can be worded more sharply.
What permissions does it need?
billing: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 (every 6 hours). 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 warned when your bill goes over budget” from your assistant

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