E-commerce

How to automate your Google Ads tasks with scripts?

How to automate your Google Ads tasks with scripts?

October 28, 2026

Wondering how to stop manually monitoring Google Ads every morning? The answer is one word: scripts. Google Ads executes small programs written in JavaScript that check, alert, and fix your campaigns for you.

For a merchant, the stakes are concrete: a rejected ad or an account down for several hours means lost budget and sales going to a competitor. The trap is believing you need to be a developer: useful scripts take just a few lines of configuration.

So how to automate your Google Ads tasks with scripts? Here's the agenda:

  • What is a Google Ads script and what is it really for?

  • How to get alerted when an ad is rejected?

  • How to know when an account has stopped running entirely?

  • How to spot search queries that are taking off?

  • How to detect a geographic anomaly before it costs you?

Let's go.

Summary

What is a Google Ads script and what is it really for?

A Google Ads script is a program written in JavaScript, the same language family used on web pages, which you upload directly to your account. It runs on a schedule you define: every hour, every morning, once a week. It reads your data, compares it to your thresholds, then acts or alerts you.

The benefit is simple: repetitive tasks don't drive sales. Manually checking if an ad is rejected, if an account is still running, or if a city is overspending: these are control chores, not strategic decisions.

The real benefit for a store lies elsewhere. Scripts transform your management into an alert system: you no longer open Google Ads to search for a problem, you open it because a problem has been reported to you. You save your energy for bids, creatives, and offers.

Convert over 2,000 customers on average per month with Qstomy.

The world’s 1st Shopify AI dedicated to customer conversion

Empowering 200+ e-commerce merchants

How do existing scripts work?

The good news is that you don't need to write everything from scratch. Several developers and consultants share ready-to-use scripts that you copy into your account and customize in a few minutes. Nils Rooijmans and the Optmyzr team publish them regularly, and their templates already cover the most common needs.

Concretely, your work often comes down to three steps: paste a spreadsheet URL, specify the email addresses to notify, and set a trigger threshold. The rest of the code runs automatically.

This template logic is valuable for a merchant managing their advertising alone or with one other person. You inherit someone else's experience who has already seen the errors, without having to reinvent the monitoring mechanism.

How to get alerted when an ad is rejected?

No account is perfect. Google regularly rejects ads, often due to wording, an overly strong promise, an image, or a link that no longer complies with the rules. The Disapproved Ads Alerts script solves this problem: instead of browsing each ad group or filtering manually, you receive a notification.

The script, created by Nils Rooijmans, generates a report in Google Sheets. You'll find the rejected ads, the relevant campaign and ad group, as well as the reason provided by Google. A daily rhythm is more than enough for this type of check.

Only two settings are required: the spreadsheet address where to write the results, and the recipient email addresses, separated by commas if multiple people are monitoring the account.

How to know when an account has stopped running?

Ads can stop for a thousand reasons: an invalid payment method, an account suspension, but also more subtle causes like a cumulative number of rejected ads, a negative keyword blocking your positive keywords, or a poorly configured schedule.

The Account Down script, offered by Optmyzr, runs every hour and triggers a notification as soon as no activity is recorded for the number of hours you define. Zero impressions, zero clicks, zero spend: in all cases, something is wrong.

Three parameters need to be filled in: the email addresses to notify, the number of hours of inactivity to monitor, and the control metric. Impressions are recommended, as their absence almost always signals a technical or delivery issue.

Why choose impressions as an alert signal?

An account can remain active while displaying nothing. Clicks and spend, on the other hand, depend on daily demand and bids: a quiet day proves nothing. Impressions, however, are the first link in the advertising chain.

If your account has recorded no impressions during an abnormal time window, it means the ads are not being served. The diagnosis is immediate, and you can fix it before the day is lost.

Watch out for the settings if you use scheduled delivery. If your ads are intentionally inactive for five hours, the alert threshold must be higher than five, at least six, otherwise the script will notify you every night for nothing. A good threshold is one that only alerts on the unexpected.

How to spot search queries that are taking off?

An active account generates thousands of new queries each week. Each one opens a decision: add a negative keyword if the query is off-topic, integrate a new keyword if it is relevant, create a dedicated campaign or group to allocate more budget to profitable terms, or write new ads.

The Trending Search Terms script, also by Nils Rooijmans, highlights queries whose impressions vary by at least 50, up or down. You see the real concerns of your buyers emerge, often before they become visible in your usual dashboards.

Three settings: the spreadsheet address, the email addresses to notify, and the message subject, for example 'search trends, main account'. This script complements in-depth keyword work well, as it starts from the reality of searches rather than your assumptions.

How to detect a geographic anomaly before it costs you?

The Geo Anomaly Detector script, also by Optmyzr, runs daily. It compares the average of several metrics, clicks, impressions, cost, and conversions, across all your target zones, then alerts in case of an unusual deviation.

Its strength is intelligent comparison: it reports the figures of a day against the average of previous weeks you have chosen. For example, it can compare a given Tuesday to the eight previous Tuesdays for the same city.

Imagine a city that usually converts one hundred times on Thursday, and drops to twenty-five on a recent Thursday. The script will signal this to you. Possible causes: reduced budget, change in bidding strategy, or an external factor like a holiday.

What settings should you plan before launching these scripts?

Each script has its parameters, but the logic remains the same. You first define an output channel: often a spreadsheet, systematically an email address. Then a threshold, meaning the boundary between normal and abnormal.

For the Geo Anomaly Detector, five values need adjustment: the number of previous weeks to examine, the recipient email addresses, the minimum daily clicks to trigger an alert, the percentage of variation from which you want to be notified, and the combined variation, in percentage and absolute value.

The advice applies to all: start with wide thresholds. A script that is too sensitive produces noise, and a report that no one reads is useless. Then tighten it once you know what truly deserves your attention.

How to organize reading reports without spending the whole day on it?

Useful but scattered alerts eventually become tiresome. The solution: centralize. Use a single spreadsheet per account, with one tab per script. Your reports arrive in the same place, and you review them in a single pass.

Also sort by frequency. Hourly checks are limited to outages, like a stopped account. Daily checks suit rejected ads and geographic anomalies. Weekly checks are sufficient for search trends, which evolve slowly.

There remains the question of recipients: putting the whole team on copy for every alert guarantees that no one will read them. Better to have one responsible person per script, and an alert that escalates to the whole team only when the outage persists.

What concrete gains for an e-commerce store?

The first gain is time. A manual daily check takes dozens of minutes, often poorly placed during the day. Once the scripts are in place, the same monitoring takes just a few minutes of reading.

The second gain is responsiveness. A rejected ad in the morning can deprive your store of traffic until evening. An alert received within the hour limits the damage, especially during peak demand periods.

The third gain, the most discreet, is the quality of decisions. When the monitoring mechanism runs on its own, your time finally focuses on what matters: your bids, your ads, your product pages, and your purchase journey. That is where the margin is won, not in report verification.

How does Qstomy complement your Google Ads campaigns?

Scripts monitor the upstream: they ensure your ads are running and your budget isn't flying away without reason. Once the visitor is on your site, another mechanism takes over. This is where Qstomy comes in, an AI agent designed for Shopify stores.

Qstomy guides the buyer toward the right decision through product recommendations, cross-selling, and upselling, and also optimizes the cart. It then supports the customer after the purchase: package tracking, account management, responses to policy questions, and after-sales service.

Over a hundred merchants are already using it. The logic is complementary: your scripts protect your ad spend, while Qstomy handles converting the traffic you pay for and retaining the customer. A well-monitored budget remains wasted if the store doesn't convert visits into orders.

What checklist before configuring your first scripts?

Before copying a script into your account, check these simple points. They prevent unpleasant surprises.

  • Access : the person installing the script must have rights on the Google Ads account and on the spreadsheet.

  • Recipients : one responsible email address per script, not a general distribution list.

  • Thresholds : wider than necessary at the start, to be tightened after a few days of observation.

  • Scheduled execution : an inactivity threshold always higher than your intentionally ad-free time slots.

In short

Four scripts cover the essentials: rejected ads, account paused, moving queries, and geographic anomalies. All rely on a spreadsheet and an email address.

Frequently Asked Questions

Faut-il savoir coder ? No. You copy the script, then configure a few parameters.

Do these scripts replace human monitoring? No, they target it. You no longer monitor everything; you handle the essentials.

To deepen your understanding of the upstream advertising, compare with Shopping ads, their ranking, and their real effectiveness before expanding your automations.

To go further: How does Google rank Shopping ads? Ad Rank, feed, and bids - Qstomy, How does Google Shopping ranking work? Paid, free, and data quality - Qstomy, Save time and money: e-commerce chatbot - Qstomy, What is Google Shopping for e-commerce? Definition, feed, and benefits for a store - Qstomy, E-commerce integrations: connect your tools to gain efficiency - Qstomy, How to improve e-commerce conversion rates and sales? - Qstomy, How does SEO work for e-commerce sites? - Qstomy.

Enzo

October 28, 2026

Convert over 2,000 customers on average per month with Qstomy.

The world’s 1st Shopify AI dedicated to customer conversion

Empowering 200+ e-commerce merchants

Subscribe to the newsletter and get a personalized e-book!

No-code solution, no technical knowledge required. AI trained on your e-shop and non-intrusive.

*Unsubscribe at any time. We do not send spam.

Subscribe to the newsletter and get a personalized e-book!

No-code solution, no technical knowledge required. AI trained on your e-shop and non-intrusive.

*Unsubscribe at any time. We do not send spam.