Free Google Ads script: a daily email when search terms waste money
Copy the script below into Google Ads (Tools, Bulk actions, Scripts), put your email in the first line and schedule it daily. Every morning it emails you the search terms that spent at least a set amount in the last days with zero conversions. It only reads your account: it never changes a bid, a keyword or a budget.
What the script does
Once a day it reads your search terms report, keeps the terms that spent money and brought no conversions, and emails you the list, highest spend first, with the campaign, the cost and the clicks of each one. If nothing crosses the threshold, it sends nothing.
It runs inside your own Google Ads account with your own permissions. No outside server sees your data, and there is nothing to sign up for.
How to install it in five minutes
- In Google Ads, open Tools, then Bulk actions, then Scripts, and press the plus button to create a new script.
- Delete the example code and paste the script below.
- Change the email in the first line to yours.
- Press Authorize, then Preview: the log shows what the script found.
- Save, go back to the list of scripts and set the frequency to Daily.
Google explains scripts and their permissions in its own guide (Google Ads Help).
The script
// Wasted spend watchdog - generated by Ads MCP
// Paste in Google Ads > Tools > Bulk actions > Scripts, then schedule it daily.
// It only reads your account and emails you. It never changes anything.
var EMAIL = 'you@example.com';
var DAYS = 7;
var MIN_SPEND = 5;
function main() {
// The last DAYS full days, up to yesterday, in the account's time zone.
var zone = AdsApp.currentAccount().getTimeZone();
var day = 24 * 60 * 60 * 1000;
var end = new Date(Date.now() - day);
var start = new Date(end.getTime() - (DAYS - 1) * day);
var format = function (d) { return Utilities.formatDate(d, zone, 'yyyy-MM-dd'); };
var query =
'SELECT search_term_view.search_term, campaign.name, metrics.cost_micros, metrics.clicks, metrics.conversions ' +
'FROM search_term_view ' +
"WHERE segments.date BETWEEN '" + format(start) + "' AND '" + format(end) + "' AND metrics.conversions = 0 " +
'ORDER BY metrics.cost_micros DESC LIMIT 50';
var rows = AdsApp.search(query);
var lines = [];
var total = 0;
while (rows.hasNext()) {
var row = rows.next();
var cost = Number(row.metrics.costMicros) / 1000000;
if (cost < MIN_SPEND) continue;
total += cost;
lines.push(
'- "' + row.searchTermView.searchTerm + '" in ' + row.campaign.name +
': ' + cost.toFixed(2) + ', ' + row.metrics.clicks + ' clicks, no conversions');
}
if (lines.length === 0) {
Logger.log('Nothing above the threshold in the last ' + DAYS + ' days.');
return;
}
var body =
'Search terms that spent without converting in the last ' + DAYS + ' days:\n\n' +
lines.join('\n') + '\n\nTotal: ' + total.toFixed(2) + '\n\n' +
'Account: ' + AdsApp.currentAccount().getName() + ' (' + AdsApp.currentAccount().getCustomerId() + ')';
MailApp.sendEmail(EMAIL, 'Wasted spend: ' + total.toFixed(2) + ' in ' + DAYS + ' days', body);
Logger.log('Email sent to ' + EMAIL + ', ' + lines.length + ' terms, total ' + total.toFixed(2));
}
Settings you can change
EMAIL: where the alert goes. For more than one address, separate them with commas.DAYS: how many full days back it looks, up to yesterday. 7 is a good start; use 14 or 30 for small accounts.MIN_SPEND: the smallest spend, in your account currency, that makes a term worth an email.
What to do with the email
For each term, ask one question: do you sell that? If not, add it as a negative keyword. If yes, keep it and give it time.
If you manage many accounts, or want the negative keywords file built for you, Ads MCP does the same review from ChatGPT, Claude or another AI assistant and returns a file ready for Google Ads Editor. It is read-only too.
Ads MCP is a read-only Google Ads connector for ChatGPT, Claude and other AI assistants. It finds the searches that spend without converting and hands you a file to import. Free: 50 tool calls a month.
More from the blog
How to connect ChatGPT to Google Ads (read-only, no code)
ChatGPT can read your Google Ads account through a custom MCP connector. Which plans allow it, the settings to turn on, and the questions worth asking once it is connected.
Can Claude run Google Ads? What it can do, and the three ways to connect it
Claude can read and manage Google Ads through an MCP connector. The three kinds of connector, what each one can change, and how to connect one in two minutes.
AI Max search terms: finding the ones that waste money
AI Max for Search matches your ads to searches you never chose. How to find the AI Max search terms that spend without converting, by hand or with Claude.