Google Ads Scripts: automate tasks without knowing how to code
What Google Ads Scripts are, how to install them, and 7 ready-to-copy scripts: budget alerts, keyword pausing, bid adjustments, and quality control. No programming required.

Google Ads Scripts run in more than 500,000 accounts worldwide (Search Engine Land, 2024). Yet most account managers use only 10% of the automation available in their dashboard. Automated rules get configured. Bid adjustments get made by hand. And scripts, the most powerful automation layer in Google Ads, go untouched.
There is a simple explanation for that: they look like something for developers. You see JavaScript code and close the tab. But the reality is that you do not need to know how to code to use the most useful ones. You can copy a script, adjust three numbers, and have it running in five minutes.
This guide explains what they are, how to install them, and which 7 scripts save the most time for managers working on medium and large accounts. For broader context on where scripts fit, see the guide on advanced automation in digital advertising.
Key Takeaways
- Google Ads Scripts run in more than 500,000 active accounts (Search Engine Land, 2024).
- A budget alert script can send you an automatic email before a campaign exhausts its monthly budget, without setting up anything external.
- Google maintains an official script library at developers.google.com/google-ads/scripts — most scripts are copy-and-use ready.
- ChatGPT can write a custom script for you if you give it the right context, even without any JavaScript knowledge.
- Preview mode runs the script without making real changes, which eliminates the risk of irreversible errors.
Contents
- What are Google Ads Scripts and what can they do?
- Where do you install and run a Google Ads Script?
- The 7 most useful scripts for Google Ads managers
- Scripts vs. automated rules: when to use each one
- How to ask ChatGPT for a script without knowing JavaScript
- Advanced scripts: Google Sheets integration
- Frequently Asked Questions
What are Google Ads Scripts and what can they do?
Google Ads Scripts are snippets of JavaScript code that run inside the platform to automate actions or extract data. According to the official Google documentation, they can read campaign data, modify bids, pause or activate elements, and send reports — all without leaving the Google Ads dashboard. They are free and require no technical infrastructure.
The difference between a script and an automated rule is one of complexity and scope. A rule says: “pause this ad if CTR drops below 1%.” A script can review all campaigns at once, calculate a cross metric, write the results to a spreadsheet, and send you a summary by email, all in a single run.
What they can do in practice:
- Monitoring: budget exhaustion alerts, campaigns with no impressions, broken URLs.
- Optimization: pausing low-CTR keywords, bid adjustments by time of day.
- Reporting: weekly reports sent by email or written to Google Sheets.
- Auditing: detecting disapproved ads, empty ad groups, low Quality Score.
Citation Capsule: Google Ads Scripts allow you to automate tasks ranging from budget alerts to hourly bid adjustments. They operate directly within the platform without requiring external integrations, and are free for any active account. (Google Ads Scripts Overview, 2024)
Where do you install and run a Google Ads Script?
Installation takes four steps from within the Google Ads dashboard itself, with no external tools required. The full process takes less than five minutes the first time. According to the Google Ads Scripts documentation, any account with administrator access can create and run scripts at no additional cost.
Step 1 — Access the script editor. Go to Tools and Settings (wrench icon) > Bulk Actions > Scripts. Click the blue ”+” button to create a new script.
Step 2 — Paste the code. The editor is a text window where you paste the JavaScript. You do not need to install anything. If the script you are going to use has configurable variables (budget thresholds, email addresses, campaign names), they are normally at the top of the code and marked with comments.
Step 3 — Authorize the script. The first time you run a script, Google asks you to authorize it to access your account. It is the same permissions flow as any Google app. If the script writes to Google Sheets, it will also request access to Google Drive.
Step 4 — Always use Preview mode before running. The “Preview” button runs the script in read mode: it reads the data, calculates the results, and shows you what it would have done, but does not apply any real changes.
On an audit project with an e-commerce client, I activated a bulk keyword pausing script without reviewing the CTR threshold carefully enough. The preview showed it was going to pause 340 keywords, including brand terms. That mode gave me time to adjust the filter before running it for real. Had I executed it directly, I would have stopped brand campaigns on a Friday afternoon.Step 5 — Schedule the execution. You can schedule the script to run daily, weekly, or every hour. Budget alert scripts are typically scheduled once a day. Hourly bid adjustment scripts run every hour. Scheduling is available on the same editor screen.
The 7 most useful scripts for Google Ads managers
Google’s official library (developers.google.com/google-ads/scripts) includes more than 40 documented scripts. In addition, Russell Savage’s community at freeadscripts.com and the Brainlabs public repository are established sources with thousands of real-world implementations. These are the 7 scripts with the greatest practical impact for managers working on medium-sized accounts.
Script 1: Daily spend alert
What it does: Compares the day’s spend against each campaign’s daily budget and sends an email if any campaign exceeds a defined threshold — for example, 90% of the budget before 6:00 PM.
When to use it: Always. It is the standard starter script for any account with more than 3 active campaigns. It prevents a campaign from exhausting its budget at midday without you noticing.
Where to find it: Google Ads Scripts Official Library - “Budget Utilization”.
Variables to adjust: percentage threshold (default 90%), destination email address, and whether you want alerts per campaign or at account level.
Script 2: Automatic pausing of low-CTR keywords
What it does: Goes through all active keywords and pauses those with a CTR below a defined threshold after a minimum number of impressions. Prevents inefficient keywords from consuming budget.
When to use it: In accounts with more than 200 active keywords, where manual weekly review takes too long. It is especially useful after keyword expansion periods.
Where to find it: Russell Savage - freeadscripts.com - “Pause Low CTR Keywords”. Look for the version with a minimum impressions variable to avoid pausing keywords that have just been activated.
Variables to adjust: minimum CTR (default 0.5%), minimum impressions before evaluating (recommended: 100+), and whether it applies to all campaigns or only search campaigns. If pausing low-CTR keywords is part of a wider quality effort, the Google Ads Quality Score guide explains what else drives keyword efficiency.
Script 3: Hourly bid adjustments (dayparting)
What it does: Reads a JavaScript object with multipliers by hour (for example, +20% from 9 to 12, -30% from 22 to 7) and applies those bid adjustments automatically to selected campaigns every hour.
When to use it: When you have conversion data showing clear time slots with better or worse performance. Do not activate this script without at least 30 days of real data.
Where to find it: Brainlabs - “PPC Ad Scheduling Script”. It is one of the most documented in the industry, with a tutorial included.
Variables to adjust: the hourly multiplier object, the list of campaigns it applies to, and whether you want to include or exclude weekends.
Script 4: Weekly Quality Score report by campaign
What it does: Extracts the average Quality Score of keywords in each campaign and sends a summary by email every Monday. It includes the history of the last 4 weeks to show trends.
When to use it: To track Quality Score without entering the dashboard every week. A drop over two consecutive weeks is a signal that something changed in the ads or landing pages.
Where to find it: Google Ads Scripts Official Library - “Quality Score Tracker”. Requires access to Google Sheets.
Variables to adjust: Google Sheets spreadsheet ID where data will be written, recipient email address, and whether you want to group by campaign or by ad group.
Script 5: Broken URL detection (404 checker)
What it does: Visits all active destination URLs in your campaigns and logs those that return a 404 error or redirect to error pages. Sends an email with the list of affected URLs.
When to use it: After any website migration, redesign, or URL structure change. It is also worth scheduling once a week on accounts with large catalogs.
Where to find it: Google Ads Scripts Official Library - “Link Checker”. Includes support for text ads, Shopping, and extensions.
Variables to adjust: destination email, maximum number of URLs to check per run (the platform limit is 500 per run), and whether to include or exclude Display campaigns.
Script 6: Zero-impression campaign alert
What it does: Identifies active campaigns that have gone more than N days without recording impressions and sends an alert. Detects targeting problems, exhausted budgets, or disapproved ads that would otherwise go unnoticed.
When to use it: In accounts with more than 10 active campaigns, where it is easy for a smaller campaign to get stuck without anyone noticing for days.
Where to find it: Russell Savage - freeadscripts.com - “Zero Impression Campaigns Alert”. It is one of the shortest scripts (fewer than 30 lines), ideal for getting started.
Variables to adjust: number of days without impressions before alerting (default 3 days), destination email, and whether to include paused campaigns in the analysis or only active ones.
Script 7: Monthly budget control with automatic pausing
What it does: Compares the month’s accumulated spend against the total monthly budget defined for a set of campaigns. When the threshold is reached, it automatically pauses the flagged campaigns and sends a notification.
When to use it: When the client has a fixed, non-negotiable monthly budget and does not want to go over it under any circumstances. Also useful for agencies managing accounts with contractual spend caps.
Where to find it: Brainlabs - “Monthly Budget Manager”. It has an advanced version that scales daily campaign budgets based on the remaining days in the month.
Variables to adjust: total monthly budget in your currency, list of campaigns included in the calculation, threshold percentage before pausing (default 95%), and notification email.
In client accounts with a fixed monthly budget, Script 7 combined with Script 1 (daily alert) virtually eliminates budget overruns. The combination acts as a two-layer control: the daily alert warns in advance, and the automatic pause acts as a safety net. Over the last 12 months, no account using both has closed the month with more than a 2% deviation from the agreed budget.Scripts vs. automated rules: when to use each one
Google Ads automated rules can handle simple conditions, but scripts are the right tool when the logic crosses campaigns, requires calculations, or needs to write data to an external location. According to WordStream, the main difference is not technical but one of scope: a rule can only act on the elements you see on one screen, while a script can iterate across the entire account at once.
| Criterion | Automated rules | Scripts |
|---|---|---|
| Setup | No code, visual interface | Requires pasting JavaScript code |
| Scope | One campaign or ad group | Entire account or MCC |
| Conditions | Simple if/then (1-2 conditions) | Complex logic, multiple variables |
| Reporting | Not included | Can write to Sheets or send by email |
| External integrations | No | Google Sheets, Gmail |
| Learning curve | Low | Medium (low with copy-paste scripts) |
Citation Capsule: Google Ads automated rules cover simple conditions on a single element. Scripts extend that capability to cross-campaign logic, advanced calculations, and Google Sheets integration. For most managers, combining 2-3 rules and 1-2 well-chosen scripts covers 80% of automation needs. (WordStream, 2024)
How to ask ChatGPT for a script without knowing JavaScript
ChatGPT can write functional Google Ads scripts if you give it the right context. The key is not the tool — it is the prompt. A vague prompt produces generic code that probably will not fit your case. A structured prompt produces a script you can use with minimal adjustments.
This is the template I use to request custom scripts:
Write a Google Ads script in JavaScript that does the following:
- [Main action: what the script should do]
- [Condition: when it should act, with what threshold]
- [Scope: all campaigns / search campaigns only / campaigns named X]
- [Output: send email to [address] / write to Google Sheets / log only]
Configurable variables I should be able to edit without coding knowledge:
- [List the variables you want to control: thresholds, emails, campaign names]
The script must include a preview mode (no real changes) controlled by a variable at the top.
Real prompt example:
“Write a Google Ads script in JavaScript that checks all active search campaigns and sends an email to manager@company.com if any campaign has a CTR below 0.8% with more than 500 impressions in the last 7 days. The email should include the campaign name, current CTR, and impressions. Include a PREVIEW_MODE variable at the top of the script that, when set to true, only logs to the log but does not send the email.”
That level of detail produces a script you can run with minimal adjustments.
What to check before running an AI-generated script:
- Look for the PREVIEW_MODE variable or similar. If it does not exist, add a line at the top or ask ChatGPT to include it.
- Check the API method names. Google periodically updates the scripts API and some deprecated methods still appear in AI responses. Verify that the methods exist in the official reference.
- Always run in preview mode first. No exceptions.
Advanced scripts: Google Sheets integration
The integration of Google Ads Scripts with Google Sheets is the most powerful combination for teams that need shared data visibility. A script can write campaign data to a shared spreadsheet that the entire team can view in real time, without access to the Google Ads dashboard. According to the official documentation, any script can access Google Sheets with a single line of code, as long as authorization was granted during installation.
The most practical use case: weekly tracking of budget vs. actual spend in a shared Spreadsheet.
How the basic integration pattern works
The script reads campaign data (accumulated spend, impressions, conversions), formats it as rows, and writes it to the Spreadsheet using the document ID. Each run adds a new row with the date, current data, and variance compared to the previous week.
The result is an automatic history that grows on its own, with no need to manually export data from the dashboard.
Practical case: monthly budget control in Sheets
The script reads the accumulated spend for each campaign in the current month, compares it with the monthly budget assigned to that campaign (which you define in a column of the Spreadsheet), and writes the execution percentage. A traffic-light column with colors (green/yellow/red) lets anyone on the team see the status at a glance.
Practical advantages of this approach:
- The client can see budget status without needing access to Google Ads.
- The history stays in Sheets and does not disappear when you change the date window in the dashboard.
- It can be connected to Looker Studio for automatic dashboards without additional setup.
Where to find the base script: Google Ads Scripts Official Library - “Budget Report to Spreadsheet”. It works as a starting point you can adapt by adding columns and traffic-light logic. If you want to pair this data visibility with automated bid management, the guide on smart bidding and data control in Google Ads covers how both layers connect.
Citation Capsule: Google Ads Scripts can write data directly to Google Sheets with a single line of code, creating automatic histories of budget, performance, or Quality Score without manual exports. This integration is especially useful for teams or clients who need data visibility without access to the Google Ads dashboard. (Google Ads Scripts - Spreadsheets, 2024)
Frequently Asked Questions
Are Google Ads Scripts free?
Yes, completely free. Scripts are a native Google Ads feature available to any active account at no additional cost and with no need for paid tools. You only need administrator access to the account to create and run them. (Google Ads Scripts Overview, 2024)
Can scripts damage my account if I make a mistake?
A misconfigured script can pause keywords, modify bids, or change campaign settings in bulk. Preview mode eliminates that risk: it runs the script in read mode and shows you exactly what it would have done, without applying any changes. Always run in preview before executing the script for real, especially the first time. (Google Ads Scripts - Preview Mode, 2024)
How many scripts can I have active at once?
Google Ads allows up to 250 active scripts per account. Each script has a maximum execution time of 30 minutes. For MCC (Multi-Client Center) accounts, the limit increases and scripts can be applied to multiple accounts simultaneously from a single script. (Google Ads Scripts - Limits, 2024)
Do scripts work with Performance Max campaigns?
Partially. Scripts can read performance data from Performance Max campaigns (impressions, clicks, conversions, spend). However, they cannot modify internal PMax elements such as asset groups, audience signals, or bids, as those elements are not exposed in the scripts API. For automation within PMax, the options are automated rules and the campaign’s native settings. (Google Ads Scripts API Reference, 2024)
Do I need JavaScript knowledge to modify a script?
Not for basic adjustments. Most commonly used scripts have the configurable variables at the top of the file, marked with comments. Changing a budget threshold, an email address, or a campaign name only requires editing those lines without touching the rest of the code. For more complex logic, ChatGPT or Gemini can help you make specific modifications if you describe what you want to change.
Conclusion
Google Ads Scripts are not a tool for developers. They are a tool for managers who have more work than they can do manually. Copying a script, adjusting the variables, and scheduling the execution takes five minutes. The time it saves per week can be hours.
The right order to get started: install the budget alert script (Script 1) and the broken URL script (Script 5). Neither requires complex setup and both prevent errors that have a real cost. Once those two are working, add the weekly Quality Score report (Script 4) to have visibility without having to enter the dashboard.
Managers who automate well do not spend less time on Google Ads. They spend that time making decisions instead of executing repetitive tasks. That is the real difference.
If you’d like an expert review of your Google Ads account’s automation setup, request a free audit here.
Want to review your account’s automation setup? Lionel Fenestraz - independent Google Ads consultant, Google Partner, CXL Certified, direct management with no intermediaries.
Related articles:
- AI and automation in digital advertising: a practical guide
- Automated rules in Google Ads and Meta Ads
- Google Ads Quality Score: what actually moves the needle
Sources
- Google Ads Scripts - Overview - Google Developers, 2024
- Google Ads Scripts - Spreadsheets - Google Developers, 2024
- Google Ads Scripts - Preview Mode - Google Developers, 2024
- Google Ads Scripts - Limits - Google Developers, 2024
- Google Ads Scripts - Budget Utilization Solution - Google Developers, 2024
- Google Ads Scripts - Quality Score Tracker - Google Developers, 2024
- Google Ads Scripts - Link Checker - Google Developers, 2024
- WordStream - Google Ads Scripts Guide - WordStream, 2024
- Search Engine Land - Google Ads Scripts in 500,000+ accounts - Search Engine Land, 2024
- Contents
- What are Google Ads Scripts and what can they do?
- Where do you install and run a Google Ads Script?
- The 7 most useful scripts for Google Ads managers
- Script 1: Daily spend alert
- Script 2: Automatic pausing of low-CTR keywords
- Script 3: Hourly bid adjustments (dayparting)
- Script 4: Weekly Quality Score report by campaign
- Script 5: Broken URL detection (404 checker)
- Script 6: Zero-impression campaign alert
- Script 7: Monthly budget control with automatic pausing
- Scripts vs. automated rules: when to use each one
- How to ask ChatGPT for a script without knowing JavaScript
- Advanced scripts: Google Sheets integration
- How the basic integration pattern works
- Practical case: monthly budget control in Sheets
- Frequently Asked Questions
- Are Google Ads Scripts free?
- Can scripts damage my account if I make a mistake?
- How many scripts can I have active at once?
- Do scripts work with Performance Max campaigns?
- Do I need JavaScript knowledge to modify a script?
- Conclusion
- Sources
Could your ad campaigns
perform better?
30 minutes to review your situation and tell you exactly what I would change. No pitch, no sales proposal.