Google Ads Scripts are JavaScript code snippets that run directly inside your Google Ads account. They can read your campaign data, make changes, send emails, and write to Google Sheets, all automatically, on a schedule, without any server or programming infrastructure.
They are completely free. You write them in the Google Ads interface, authorize them once, and they run on Google's own infrastructure. No API keys, no hosting, no dependencies.
You don't need to be a programmer. If you can follow a recipe, you can use scripts. This guide gives you three complete, working scripts, you only need to read and understand them, then customize the variables at the top.
Scripts CAN:
Scripts CANNOT:
This script emails you if any campaign is spending more than 90% of its daily budget by 3pm, giving you time to act before the day ends.
// CONFIG — edit these values var ALERT_EMAIL = 'you@example.com'; var THRESHOLD = 0.90; // 90% of daily budget var ALERT_HOUR = 15; // 3pm account timezone function main() { var now = new Date(); if (now.getHours() < ALERT_HOUR) return; var campaigns = AdsApp.campaigns() .withCondition('Status = ENABLED') .get(); var alerts = []; while (campaigns.hasNext()) { var camp = campaigns.next(); var budget = camp.getBudget().getAmount(); var spent = camp.getStatsFor('TODAY').getCost(); if (spent / budget >= THRESHOLD) { alerts.push(camp.getName() + ': spent ' + spent.toFixed(2) + ' of ' + budget.toFixed(2)); } } if (alerts.length > 0) { MailApp.sendEmail(ALERT_EMAIL, 'Budget Alert: Campaigns near limit', alerts.join('\n')); } }
Schedule this script to run hourly. It will only send emails when the conditions are met (hour is 3pm or later AND a campaign exceeds 90% spend).
This script finds all keywords with Quality Score 4 or below AND cost greater than €50 in the last 30 days, then sends you a Google Sheets report.
// CONFIG — edit these values var SHEET_URL = 'YOUR_GOOGLE_SHEET_URL'; var QS_THRESHOLD = 4; var COST_THRESHOLD = 50; // minimum cost to flag function main() { var sheet = SpreadsheetApp .openByUrl(SHEET_URL).getActiveSheet(); sheet.clearContents(); sheet.appendRow(['Campaign','Ad Group','Keyword', 'QS','Cost (30d)']); var keywords = AdsApp.keywords() .withCondition('QualityScore <= ' + QS_THRESHOLD) .withCondition('Cost >= ' + COST_THRESHOLD) .forDateRange('LAST_30_DAYS') .get(); while (keywords.hasNext()) { var kw = keywords.next(); sheet.appendRow([ kw.getCampaign().getName(), kw.getAdGroup().getName(), kw.getText(), kw.getQualityScore(), kw.getStatsFor('LAST_30_DAYS').getCost() ]); } }
This script reads a Google Sheet where you define bid adjustment multipliers for each day of the week, then applies them to your campaigns automatically. This is useful when you know that weekends or specific days convert at different rates.
The structure: your Google Sheet has two columns, Day (Monday through Sunday) and Multiplier (e.g., 1.2 for +20%, 0.8 for -20%, 1.0 for no change). The script reads these values every day and applies the correct multiplier.
By reading from a Google Sheet instead of hardcoding values in the script, non-developers can update the bid adjustments without touching code. The marketing team updates the Sheet; the script reads it automatically.
After saving a script, click "Frequency" to set a schedule. Available options:
Never schedule a script without previewing it first. The Preview mode shows you exactly what the script would do (what emails it would send, what bids it would change) without executing any changes.
Click each question to reveal the answer.