Account spend cap kill switch
A hard stop for spend: when the month (or a campaign flight) reaches your cap, every selected campaign pauses until the period resets.
What it does
- Adds up spend for the selected campaigns every hour, for the calendar month or since a start date.
- Sends one warning per period when spend reaches your warning level.
- At the cap, pauses every selected campaign that is running and labels it.
- Switches them back on when a new month starts or you raise the cap, and only the ones it paused.
How it changes your account
With Alerts only turned off, the script pauses campaigns at the cap, adds a label, and re-enables labelled campaigns when spend is back under the cap. It never changes budgets, bids or ads.
Smart Bidding
Works with every bid strategy. It is a safety net, not a pacing tool: pair it with the Monthly budget pacer so the cap is rarely hit.
Settings explained
- Spend cap
The hard limit for the period.
- Period
Calendar month resets on the 1st. Since a start date never resets on its own; raise the cap or change the date to resume.
- Warn me at
One warning per period.
- Campaigns
What counts and what gets paused.
- Label for paused campaigns
How the script recognises its own pauses.
Install in two minutes
- In Google Ads, go to Tools, then Bulk actions, then Scripts.
- Click the plus button and name your script.
- Delete the sample code, paste yours and click Authorise.
- Click Preview and check the log. Nothing changes in Preview.
- Click Save and set it to run hourly.
Preview once to authorise Sheets, Drive and email. Schedule it Hourly. Test with Alerts only first.
Questions
Can spend go slightly over the cap?
Yes, by up to about an hour of spend, because the script runs hourly and Google reports cost with a short delay. Set the cap a little under your true limit.
Is this the same as an account budget?
Similar idea. Account budgets (on invoiced accounts) stop all ads at a total. This script works on any account and can cover only some campaigns.
What happens on the 1st of the month?
Spend resets to zero, so labelled campaigns are switched back on at the first run.
Will it change my account straight away?
No. Alerts only is on by default, so the first runs only report what would change. You turn it off when you are happy.
Changelog
- 1.0.1 27 Nov 2026 Fix
- A start date in the future no longer stops the script: nothing counts towards the cap until that date.
- The log Sheet is only reused when it is a live Google Sheet, never a trashed file or another file with the same name.
- Long text is trimmed to fit a Google Sheets cell.
- Saved state is split across cells, so big accounts never hit the cell size limit.
- First release in the Invincible Google Ads scripts library.
- 1.0.0 27 Nov 2026 Improvement
- First release in the Invincible Google Ads scripts library.
Scripts are provided as is. You're responsible for previewing, testing and monitoring them in your account. Scripts Terms of Use.