- Requires a positive owner-set MONTHLY_BUDGET; the default null cap deliberately stops
- Rejects missing, unsafe or inconsistent spend data rather than treating it as zero
- Preflights bounded Search/Display, Shopping, Video and Performance Max selectors; other campaign types are not covered
- Checks account-day rollover and stops on incomplete inventory or partial pause failure; never automatically resumes campaigns
Free Google Ads script · Budget safety
Budget guard
Review reported monthly and daily spend against an owner-set cap, with dry-run safeguards before optional campaign pauses.
What it is for
A faster check.
Not automatic judgement.
Compare reported month-to-date spend with your own account-currency cap and today’s spend with monthly budget divided by 15: twice a fixed 30-day average, not Google’s platform daily budget. The cap is normalized to the nearest microcurrency unit; integer-micro comparisons prevent false triggers at exact equality. Only strictly greater values trigger. The account calendar anchors both queries. Preview and dry run never pause campaigns or send email.
- 01Set the cap in the account’s currency and confirm the fixed monthly/15 threshold fits your intent
- 02Keep DRY_RUN: true, run Preview, and review the actual account, thresholds and supported campaign scope with its owner
- 03Only an owner-approved live run with DRY_RUN: false can attempt pauses; reporting delays and non-atomic calls still allow overspend
- 04Email is separately disabled by default: review confidential spend information and recipients before setting ENABLE_EMAIL: true; Preview and dry run still never send
- 05MAX_CAMPAIGNS bounds total selector rows at 1–1000, including duplicates. Investigate errors or limits rather than assuming complete protection
This financial script can pause valid traffic. It is not a hard budget or billing cap, does not cover every campaign type, and does not automatically resume campaigns. Missing or zero-suppressed reporting rows mean no assessment. If a pause fails, earlier calls may have succeeded and the failing call’s outcome may be unknown: inspect the account manually, never blindly rerun. An email failure does not undo pauses; email delivery is not verified. Logs contain spend figures; keep them private. No Sheets or external HTTP export. Fresh documentation and offline mock checks were reviewed on 31 October 2026; no live Ads account execution was performed.
Use this script at your own risk. Google Ads interfaces and reporting fields change. Always run Preview in the intended account and read the logs before enabling or scheduling it.
Loading script…How to install a Google Ads script
Copy. Configure.
Preview. Schedule.
- Open the correct Google Ads account and go to Tools → Bulk actions → Scripts.
- Create a new script, remove the example code and paste this script.
- Edit the CONFIG block. Never leave placeholder emails, budgets or thresholds unchanged.
- Authorize the script, select Preview and inspect its logs or report.
- Only schedule it after the preview matches the intended account and scope.
Read the output
What should you check before acting?
Budget safeguards should warn a person before spend becomes surprising; they cannot define a sensible budget by themselves. Confirm the account currency, daily or monthly budget convention, campaign sharing and time zone before setting thresholds. Compare a warning with the actual campaign budget, billing and change history, then decide whether the spend is expected for the current plan. A high-spend alert does not prove waste, and a quiet report does not guarantee every campaign is within its commercial target. Start with Preview and conservative thresholds, check that the output identifies the correct account and campaigns, and document who will review alerts. Keep any optional email private and verify the recipient before activation. Revisit the safeguard when budgets or campaign structures change so old thresholds do not become misleading.
The suggested cadence for this script is owner-reviewed schedule; not a real-time spend ceiling. Treat that as a review starting point, then adapt it to the account's volume and the person available to check the output. Keep a note of the account, date window, first Preview result and the decision made from it. If the output is incomplete or the account cannot be confirmed, stop at review; do not infer that a missing warning means there is no problem. Compare any alert or export with the native Google Ads view before making an account change, and record who reviewed the result.
What can a budget warning establish?
It can draw attention to a threshold that deserves a look, but it cannot determine whether the spend was planned or profitable. Check campaign and shared-budget settings, account currency, billing and the period used by the script. A new campaign or promotion may intentionally spend more; an unchanged budget can also waste money if the search intent or leads are poor. Review the actual account and the business's capacity before treating an alert as a fault.
How should safeguards be maintained?
Preview with thresholds appropriate to the advertiser rather than copying values from another account. Verify the recipient and scope of any notification, then record who will respond and how quickly. Compare alerts with the native change history and conversion records. Revisit the configuration when budgets, campaigns or exchange assumptions change so an old threshold does not create false confidence. The script should support a documented human decision, not silently revise spend without context.