Google Ads scripts or an AI agent: which to use for what
Google Ads scripts are JavaScript that runs inside Google Ads on a schedule and repeats the same logic each time, which suits fixed checks, alerts and exports. An AI agent decides what to look at and writes its own queries, which suits open questions and analysis across several sources. As of November 2026, Google caps a single-account script run at 30 minutes, and automated rules cover simple condition-and-action changes without code.
What Google Ads scripts are
Google's product overview describes scripts as a serverless automation environment. You write modern JavaScript (ES6+) in a browser-based editor, test it in preview mode and schedule it to run hourly, daily, weekly, monthly or on demand. Scripts run on Google's infrastructure at no additional cost. Per the get started page, they sit under Bulk actions, then Scripts, in the Tools menu. The scheduling steps in the help article list once, daily, weekly or monthly, with no hourly option. Where the two differ, the developer documentation is the page to follow.
A script reads with AdsApp.search(), which takes GAQL, the query language of the Google Ads API, according to the reporting guide. It writes with entity methods or with AdsApp.mutate() and mutateAll(), which per the mutate guide can perform most operations that GoogleAdsService.mutate can, including creating campaigns. It can also call outside services with UrlFetchApp and update Google Sheets. Scripts can change bids, and the help article names that next to pausing ad groups and adding keywords.
Limits that decide whether a script fits
The limits page, last updated 16 November 2026, gives these numbers as of November 2026:
| Limit | Value |
|---|---|
| Run time, one account | 30 minutes, then the run is cancelled |
| Run time, manager script | 30 minutes, or 60 with executeInParallel and a callback |
| Accounts in parallel | Up to 50 |
| Entities per iterator | 50,000 by default; reports are not subject to entity limits |
| IDs in one selector | 10,000 |
| Log output | Truncated at 100Kb |
| Authorized scripts | 250 (the limits page says per account, the overview says per user) |
| Bulk upload | 50MB and one million rows |
A script cancelled at the time limit keeps the changes it made before that point, so a long loop that times out can leave a job half done. The standard campaign selector filters out video and shopping campaigns, which need their own selectors. Google also writes that the limits "can change at any time without warning" and asks for error handling in scripts.
Underlying Apps Script services add daily quotas of their own. The Apps Script quota table lists 20,000 URL Fetch calls a day for consumer accounts and 100,000 for Google Workspace accounts.
Scripts also cost upkeep, since someone has to own the code. The help article says scripts suit people who "know or work with someone who can use JavaScript", and warns that "changes to your scripts can't be undone".
Where automated rules fit
Automated rules are the no-code option inside Google Ads. Google describes them as automatic changes to ad status, budgets and bids. Its examples include changing a budget on certain days of the week, turning ads on and off for a promotion and pausing keywords that are not performing well. The setup article adds that rules can trigger emails when specific conditions occur.
Rules have their own edges. Google's management article says a rule scheduled for 9 a.m. may run anytime between 9 a.m. and 11 a.m. Its tips page says rules have no way to prioritize themselves, so two rules on the same items both run, and it suggests staggered start times and minimum and maximum limits on bids and budgets. Rules come with a preview, and the management article says campaign, ad group, ad and keyword rules can be undone from Version history.
What an agent adds, and where it is weaker
A script answers the question its author wrote down, while an agent can choose which question to ask. Alpue Studio, the AI harness for marketing we build, writes its own queries against Google Ads (in GAQL), Meta, Sklik, Google Analytics 4, Search Console and Merchant Center. Each query it ran opens under "See query". When a question needs more than a query, such as a forecast or a budget split, it writes Python in a cloud sandbox and shows the code with the result. That suits a question like "why did cost per lead rise last week", and comparisons across ad platforms, which a script can make only if someone writes and maintains the API calls.
An agent is weaker at the job a script does best. A script is fixed text, so a check runs the same way each time, at no additional cost according to Google. One practitioner who runs both keeps scripts for monitoring and alerting for that reason and uses them to watch the changes agents make. He notes that LLMs tend to respond differently each time they are asked the same question. A model may therefore write a different query for the same request. Each question also draws on the plan's model usage, which grows with the plan (Team has 5 times the usage of Pro, see pricing).
Alpue Studio has limits that matter here too. It has no autopilot and no tool that pushes changes to an ad account. A campaign, change or audience reaches Google Ads only after a person with the right role drags a slider, and Shopping and Performance Max campaigns leave as a Google Ads Editor file. The human approval post covers that design.
Which job goes where
The Alpue Studio column describes what the product does when briefed in chat.
| Job | Script | Automated rule | Agent (Alpue Studio) |
|---|---|---|---|
| Email an alert when spend passes a threshold, every hour | Yes, hourly schedule and MailApp | Email action, but a rule may run up to 2 hours after its scheduled time | Starts from a chat brief, has no autopilot |
| Pause keywords by a fixed condition | Yes | Yes, a documented example | Reads the data, a person sends changes with a slider |
| Change a budget on certain weekdays | Yes | Yes, a documented example | Each change is sent with a slider, one action at a time |
| Export a report to a sheet each morning | Yes, exportToSheet() | Not a documented rule action | Hands back PDF, Excel or CSV files when asked |
| Explain a change in cost per lead | Only if you write that query | Not a documented rule action | Yes, writes and shows its queries |
| Combine Google Ads, GA4 and Meta | Possible with API calls you write | Not a documented rule action | Native connections to each, read-only |
| Run one check across 50 accounts | Manager script, up to 50 in parallel | Not documented in the pages cited here | One workspace per client, each with its own accounts |
The same check as a script and as a request
The script below emails search terms that spent more than 20 in account currency over 30 days and converted nothing. The query pattern follows the search term example in Google's reporting guide, and AdsApp.search returns fields in lowerCamelCase. The filters on conversions and cost are ours, and we have not run the script against an account.
function main() {
const query =
'SELECT campaign.name, search_term_view.search_term, metrics.cost_micros, metrics.clicks ' +
'FROM search_term_view ' +
'WHERE segments.date DURING LAST_30_DAYS ' +
'AND metrics.conversions = 0 AND metrics.cost_micros > 20000000 ' +
'ORDER BY metrics.cost_micros DESC LIMIT 50';
const lines = [];
for (const row of AdsApp.search(query)) {
lines.push([
row.campaign.name,
row.searchTermView.searchTerm,
Number(row.metrics.costMicros) / 1000000,
row.metrics.clicks,
].join(' | '));
}
if (lines.length > 0) {
MailApp.sendEmail('[email protected]', 'Search terms with spend, no conversions', lines.join('\n'));
}
}
Preview mode only simulates calls that start from AdsApp. Google's preview page says an email sent with MailApp goes out whether the script was previewed or run, and spreadsheets are updated in both cases, so use your own address while testing.
The agent version is a request in the chat:
Look at the search terms in this workspace's Google Ads account for the last 30 days.
List terms with spend above 20 and no conversions, grouped by theme, with the campaign
for each. Show me the query you ran.
The script runs on its schedule without anyone asking. The agent answers when asked, and a follow-up such as "now split that by device" is another message, where a script needs a new version. Our GAQL examples cover queries like this one.
Using both
A workable split is that scripts watch and an agent investigates. A script raises an alert on a conversion drop or an unexpected change, and an agent looks into why. A script a model wrote is still a script, so preview it first and remember the MailApp and spreadsheet caveat above. To connect a model to the API directly instead, the Google Ads MCP server post shows what that gives you, and what an AI agent for Google Ads does describes the agent route. The Alpue Studio connection is described on the Google Ads integration page.
Questions
Are Google Ads scripts still worth using?
Yes, for fixed checks. Google's overview lists routine account management, custom reports and external data sources as uses, and the practitioner linked above keeps using scripts next to agents for monitoring. Open-ended questions need new code each time.
Can AI write Google Ads scripts?
Google's pages do not mention AI-written scripts. What they document applies to a script in the editor whoever wrote it. Authorize it, preview it and read the logs before scheduling it, and remember that preview only simulates calls that start from AdsApp.
What are the limits of Google Ads scripts?
As of November 2026, a run lasts 30 minutes, or 60 for a manager script that uses executeInParallel with a callback. An iterator returns 50,000 entities by default. Google allows 250 authorized scripts and a bulk upload of 50MB and one million rows, and says the limits can change without warning.
Can a script change bids?
Yes. Google's help article says scripts can change bids, pause ad groups and add keywords, and AdsApp.mutate() accepts generic API operations. Preview mode shows what a script would change without changing it, and the help article warns that changes to your scripts can't be undone.
Sources
- Google Ads scripts product overview, Google for Developers. Read 26 November 2026.
- Get started with Google Ads scripts, Google for Developers. Read 26 November 2026.
- Limits, Google Ads scripts documentation. Read 26 November 2026.
- Reporting, Google Ads scripts documentation. Read 26 November 2026.
- Mutate, Google Ads scripts documentation. Read 26 November 2026.
- Preview mode, Google Ads scripts documentation. Read 26 November 2026.
- Quotas for Google services, Google Apps Script. Read 26 November 2026.
- Using scripts to make automated changes, Google Ads Help. Read 26 November 2026.
- About automated rules, Google Ads Help. Read 26 November 2026.
- Set up automated rules, Google Ads Help. Read 26 November 2026.
- Tips for using automated rules, Google Ads Help. Read 26 November 2026.
- Manage your automated rules, Google Ads Help. Read 26 November 2026.
- Do you still use scripts now that you use AI agents?, nilsrooijmans.com. Read 26 November 2026.