This script will pause campaigns, ad groups, or keywords when they reach a predefined budget.
Notes: You have to create two copies of this script and place them both in your AdWords account. The first runs hourly and should include the line below which will check if spend today for any campaign, ad group, or keyword with the label ‘Limit Daily Spend’ is greater than 100, and if so, pause it.
The second copy of this script should be set to run every morning between midnight and 1am and include the line below which will enable any campaigns, ad groups, or keywords with the label ‘Limit Daily Spend’. This is needed so your items that got paused by the hourly script are automatically unpaused every day.