Hello,
Assuming the campaign type is supported by scripts, one common approach is to run an hourly script that checks the current cost of a campaign and compares it with the campaign's daily budget. If the campaign has exceeded the budget, or a preset threshold, then the campaign is paused. The script should also check if it is the first hour of the day, and if it is, then all paused campaigns should be enabled. It may a good idea to use labels, just in case the campaign is paused for another reason other than this particular budget requirement. Please see the script below:
function main() {
//Check the hour of day (0 is the first hour, in this case)
var hourOfDay = Utilities.formatDate(new Date(), AdsApp.currentAccount().getTimeZone(), 'H');
var labelName = 'Budget pause';
//Check if the label exists, and if not, create the label, 'Budget pause'
if(!AdsApp.labels().withCondition("Name = '" + labelName + "'").get().totalNumEntities())
AdsApp.createLabel(labelName);
var campaigns = AdsApp.campaigns().withCondition("Name CONTAINS 'CampaignName'").get(); //Customize your conditions
//Remove labels and enabled campaigns that were paused yeseterday
if(hourOfDay == 0) {
var pausedCampaigns = AdsApp.campaigns().withCondition("LabelNames CONTAINS '" + labelName + "'").get();
while(pausedCampaigns.hasNext()) {
var campaign = pausedCampaigns.next();
campaign.enable();
campaign.removeLabel(labelName);
}
}
//Check if campaigns have exceeded budget and pause those campaigns
while(campaigns.hasNext()) {
var campaign = campaigns.next();
var cost = campaign.getStatsFor("TODAY").getCost();
var budget = campaign.getBudget().getAmount();
if(cost > budget) {
campaign.pause();
campaign.applyLabel(labelName);
}
}
}
Regards,
Matt
Google Ads Scripts Team

ref:_00D1U1174p._5001UOEcQi:ref