> Quick Definition, Claude Code Google Ads loops: A scheduled Claude Code prompt that reads your Google Ads account, spend, keywords, search terms, and creatives, on a fixed cadence and writes a brief, posts an alert, or queues an approved change. It is the difference between "I checked Ads at 9 a.m." and "a budget pacing check runs itself every morning at 6 a.m."
The claude-ads plugin on GitHub has 8,100+ stars. That is a lot of people who downloaded a Claude Code Google Ads tooling layer. Yet a SERP audit for "claude code google ads" returns Reddit threads, a GitHub README, and "can AI manage my ads?" posts, no published /loop workflow paces budgets or mines search terms on a clock. The community has the tool. The pattern is missing: four named loops, real .loop files, cron, and a safety ladder so a model does not pause a converting keyword at 2 a.m.
If you read the hub on Claude Code Loop Engineering for Modern GTM you already know ESG (Enable → Schedule → Govern) and the 5 GTM Loop Archetypes. Every loop here is a Monitor or Optimize archetype applied to paid search. The discipline transfers; the configs do not. The goal is cost-bounded automation you can ship without learning to code, four loops, four cron entries, one persona file, and a rule that money-moving actions wait for a human.
TL;DR
- The Google Ads Loop Ladder (read-only → approve-and-execute → autonomous) is the original framework in this article. You do not start autonomous. You start read-only, graduate to queued changes, and only then, if ever, let a loop execute inside a spend cap.
- A daily budget-pacing loop costs under $3/month in tokens and replaces the "open Ads, squint at the graph, hope we are on pace" ritual. Google Ads Scripts (native automation) can also pace spend; they cannot explain why a campaign is overpacing or draft the Slack note your client will actually read.
- Claude Code /loop is not a replacement for Smart Bidding or Ads Scripts, it is a scheduler and reasoner on top of the Google Ads API (or a CSV export). The loop reads yesterday's numbers and decides what a human should look at.
- Safety is the part nobody publishes, pause rules, negative-keyword queues, and Performance Max asset notes each need a different approval gate. The Loop Ladder section below is the part the SERP omits.
Why Claude Code Google Ads needs loops
Paid search has always been a "log in, scan yesterday, tweak, log out" discipline. Google Ads Scripts (native automation) fire when spend exceeds a threshold. Automated rules pause a keyword when CPA blows past a number you typed last quarter. Neither one reads the search-term report, notices three new queries eating budget with zero conversions, drafts the negative list, and posts the rationale to Slack before coffee. The gap between "a script fired" and "a marketer decided" is where wasted spend compounds.
A scheduled Claude Code prompt closes that gap. The loop runs at 6 a.m., reads yesterday's spend against the month-to-date cap, flags campaigns that will overshoot, and writes a brief before you open the account. Scripts are excellent at "if cost > X, email me." They are silent on "this Performance Max asset group is spending 40% of budget on queries at 0.3x account CPA, here is the negative queue." Claude Code Google Ads loops add the reasoning layer Scripts never had. Directional: operators who move from weekly audits to daily loops typically catch wasted-query spend days earlier. Faster detection means cheaper waste.
Two loop families sit in that gap and almost never show up in published write-ups: budget pacing loops that watch overspend and underspend against a monthly cap, and bid management loops that recommend (not blindly apply) tCPA / tROAS nudges when a campaign has been off-target for two weeks. Smart Bidding still owns the auction. The loop owns the review cadence a human used to run by hand.
Setting up Google Ads API access for /loop
These loops do not log into ads.google.com like a person. They talk to the Google Ads API, or they read a CSV you exported on a timer. Before any .loop file is worth writing you need three pieces: a Google Cloud OAuth client, a Google Ads developer token, and, if you run more than one account, an MCC that can see the clients you care about.
The CLAUDE.md file is the persona every loop in this article shares. Without it, each run re-derives account context and burns tokens re-reading your campaign list. With it, every run starts from "you are the PPC agent for this MCC, here are the data sources, here is what you must not do."
OAuth, developer token, and MCC for Claude Code Google Ads
OAuth is how Claude Code proves it is allowed to read your account. You create a Google Cloud project, enable the Google Ads API, and download a client ID / secret. The first run opens a browser, you approve access, and a refresh token lands in a local secrets file that is not committed to git.
The developer token is a separate Google Ads thing. Apply inside the API Center of your MCC. Test-account tokens are fine for read-only loops; production access is required for live client spend. Approval can take days, so start the application before you write the first .loop file.
The MCC is how one credential sees many client accounts. Point the loop at the MCC ID, then pass a customer ID per run (or a list in data/ads/accounts.yaml). A hard-coded single customer ID will not survive the second client you add.
# CLAUDE.md (excerpt)
You are the PPC agent for the Metaflow MCC.
Your job: monitor spend, keywords, search terms, and creatives, never mutate the account without a queued approval.
Your data sources live in data/ads/, spend CSVs, keyword exports, search-term reports, asset scores.
Your alert channel is #ppc-alerts on Slack.
Your output format is a markdown brief saved to data/ads/briefs/YYYY-MM-DD-*.md.
Rules:
- Never pause, enable, or change bids in the live account from a read-only loop.
- Cite the campaign ID and date range for every spend or CPA claim.
- If a report file is older than 24 hours, flag it as stale and skip the run.
- Daily spend mutations, if ever enabled, must stay inside the Loop Ladder cap in data/ads/safety.yaml.If API access is blocked while you wait on the developer token, you can still ship the first loop against a scheduled UI or Editor export dropped into data/ads/. The loop does not care whether GAQL or a CSV produced the file. It cares that the file is fresh.
Loop #1: Daily budget pacing + over/under spend alerts
Budget pacing loops are the first Claude Code Google Ads loop most teams should ship. This is a Monitor archetype, read-only, daily cadence, alert-only output. The loop reads yesterday's spend, computes month-to-date versus remaining days in the month, and posts a Slack alert when a campaign is on track to overshoot or undershoot its cap by more than 10%.
The reason this loop earns the first slot is blast radius, not sophistication. A pacing miss is the failure mode your client notices first: the budget is gone on the 18th, or 40% unused on the 28th so Smart Bidding never spent into converting days. Google Ads Scripts can email you when a campaign hits 90% of budget. They will not tell you that Campaign A is overpacing because Brand is cheap this week and Campaign B is underspending because the tCPA is 20% too tight. The loop's job is the explanation, not the raw threshold.
# .loops/ads-budget-pacing.md
Every day at 06:00:
1. Read data/ads/spend-YYYY-MM-DD.csv (yesterday by campaign: cost, conversions, budget, status).
2. Compute MTD cost, remaining days, implied daily run-rate, and projected month-end spend.
3. Flag overpace if projected spend > budget * 1.10. Flag underpace if projected spend < budget * 0.85 and lost impression share to budget > 10%.
4. For each flagged campaign, write a two-sentence cause hypothesis (delivery, tCPA tightness, or query mix) citing the campaign ID.
5. Save the brief to data/ads/briefs/YYYY-MM-DD-pacing.md.
6. Post overpace and underpace rows to #ppc-alerts. If empty, post "on pace".# crontab
0 6 * * * cd /path/to/repo && claude code /loop .loops/ads-budget-pacing.mdThe token cost is small because the loop reads one spend file and writes one short brief. A 40-campaign MCC export is roughly 6,000 input tokens and 1,200 output tokens per run. At current Claude per-token prices that is under $0.04 per run, or about $1.20/month for a daily loop. Directional: the same morning check, done by a person, is 15, 25 minutes. The loop does not replace a weekly strategy review. It replaces the daily "are we on pace" glance.
Loop #2: Keyword performance review + pause low-performers
The keyword review loop is a weekly Optimize archetype. It reads your search-campaign keyword export, scores each keyword on wasted spend, and produces a pause queue, not a live pause. On the Loop Ladder this lives on the approve-and-execute rung: the loop drafts the list, a human confirms, then the change ships.
Low-performer is not "CPA above target yesterday." That rule pauses converting keywords after an unlucky day. The loop uses a 14-day window, a click floor so it does not pause a keyword with four clicks, and a CPA multiple, typically 2x campaign target with zero conversions, or 3x target with conversions that are still too expensive. Exact-match brand terms are excluded. Competitor terms get a separate bucket.
This is also the honest home for bid management loops. You should not let Claude Code Google Ads rewrite manual CPC bids on a timer if the account is on tCPA or tROAS, Smart Bidding already owns that surface, and a second bidder fights it. What the loop can do is recommend a 10, 15% tCPA raise when a campaign has been under-delivering for 14 days, or a 10, 15% tCPA cut when CPA has been under target with lost impression share to rank. Those notes belong in the same weekly brief as the pause queue. They are advice, not an auto-bidder.
# .loops/ads-keyword-review.md
Every Monday at 09:00:
1. Read data/ads/keywords-YYYY-MM-DD.csv (14-day cost, clicks, conversions, CPA, match type, campaign).
2. Exclude brand exact terms listed in data/ads/brand-terms.txt.
3. Queue pause candidates: clicks >= 30 AND conversions = 0 AND cost >= 2x campaign target CPA, OR clicks >= 50 AND CPA >= 3x target.
4. Queue bid-target notes: campaigns 14 days under-delivering with IS lost to rank, or 14 days beating CPA with room to tighten, recommend a 10-15% tCPA nudge, never a live bid write.
5. Draft the pause list and the bid notes into data/ads/briefs/YYYY-MM-DD-keyword-review.md.
6. Post the top 15 pause candidates to #ppc-alerts with campaign ID, cost, and the approval command to run if a human signs off.# crontab
0 9 * * 1 cd /path/to/repo && claude code /loop .loops/ads-keyword-review.mdA daily pause loop produces panic. Most keywords do not accumulate a useful sample in 24 hours, and a Monday review is the cadence that matches how search campaigns actually decay. Pair it with the daily pacing loop: pacing tells you the account is bleeding; this loop tells you which keywords are the wound.
Loop #3: Search term analysis + negative keyword additions
The search-term loop is the loop that pays for the whole stack. It is a twice-weekly Monitor-plus-Optimize hybrid: read the search terms report, classify junk, and queue negative keywords. It does not add negatives live on week one. Negatives are easy to over-apply and hard to unwind, especially in phrase match and in shared MCC lists.
Classification is the part a Google Ads Script rarely does well. A script can flag "cost > $50 and conversions = 0." Claude Code Google Ads can read the query, notice it is a job-seeker, a DIY tutorial, or a research query with no purchase intent, and bucket it. The output is a 20-row negative queue with a match-type recommendation (exact for ambiguous terms, phrase for clear junk) and a "do not negate" list for queries that look wasteful but are one conversion away from mattering.
Performance Max automation via Claude Code belongs here more than in a keyword loop, because PMax does not give you a keyword tree. What you get is a search-term / search-theme report (coverage varies by account), asset-group spend, and brand inclusions. Treat PMax rows as a separate tab: proposed account-level negatives, brand-inclusion checks, and a note when an asset group soaks budget on queries you cannot pause as keywords. That is the realistic PMax surface, not "Claude Code will optimize PMax the way a human does inside the UI."
# .loops/ads-search-terms.md
Every Tuesday and Friday at 08:00:
1. Read data/ads/search-terms-YYYY-MM-DD.csv (7-day query, campaign, cost, clicks, conversions, including PMax where the export has rows).
2. Classify each high-spend zero-conversion query: irrelevant-intent, competitor, job-seeker, research, or keep-watch.
3. Propose negatives: exact match for ambiguous queries, phrase match for clear junk. Skip any query that matches a converting n-gram in data/ads/converting-ngrams.txt.
4. Split Search vs Performance Max into two sections. PMax rows become account-level negative proposals plus an asset-group note, never a keyword pause.
5. Save to data/ads/briefs/YYYY-MM-DD-search-terms.md.
6. Post the proposed negative list to #ppc-alerts with an approval checklist. Do not write negatives to the API from this loop.# crontab
0 8 * * 2,5 cd /path/to/repo && claude code /loop .loops/ads-search-terms.mdThe token cost is moderate because search-term files get wide. A mid-size account can produce 15,000, 40,000 input tokens twice a week. Expect about $0.15, $0.40 per run, or $1.50, $3.50/month. That is still cheaper than a junior analyst's Tuesday morning, and the loop never "forgets" to run when you are in client meetings.
Loop #4: Creative rotation analysis + refresh triggers
The creative loop is a weekly Monitor archetype that answers a question Ads Scripts barely touch: which RSAs and Performance Max assets are tired, and which should be cloned and rewritten? Google will tell you "Ad strength: Good." It will not tell you that headline 3 has a 0.6x CTR versus the asset group for 21 days and that you should refresh before the next budget increase.
The loop reads an asset export, RSA headlines and descriptions with impressions, clicks, and conversion share; PMax asset-group performance where Google exposes it. It scores fatigue as a blend of age, impression share within the ad, and CTR decay versus the campaign baseline. The output is a refresh trigger list: assets to keep, assets to pause-and-replace, and a short copy brief (angle, proof point, character-safe headline). The loop does not upload new ads. Upload is a Generate step after a human picks the briefs.
Claude Code Google Ads creative rotation is also the intake queue for a separate production loop. If you do not have one, the markdown brief is still enough for a copywriter on Monday.
# .loops/ads-creative-rotation.md
Every Wednesday at 10:00:
1. Read data/ads/assets-YYYY-MM-DD.csv (asset text, type, impressions 21d, CTR, conversions, date added, campaign / asset group).
2. Score fatigue: days_live * 0.3 + ctr_vs_baseline_drop * 0.4 + impression_share_within_ad * 0.3. Flag top 10 tired assets.
3. Skip assets with fewer than 1,000 impressions, not enough sample to call fatigue.
4. For each flagged asset, draft a replacement brief: angle to keep, proof to add, 3 headline options <= 30 characters, 2 descriptions <= 90.
5. Save to data/ads/briefs/YYYY-MM-DD-creative.md.
6. Post the top 5 refresh triggers to #ppc-alerts with links to the briefs. Do not mutate ads from this loop.# crontab
0 10 * * 3 cd /path/to/repo && claude code /loop .loops/ads-creative-rotation.mdThe token cost is small-to-moderate. A weekly run at ~12,000 input tokens and ~3,000 output tokens lands around $0.10 per run, $0.40/month. The value is the trigger: you refresh because a loop named the tired asset, not because a client asked why the same three headlines have been live since Q1.
Claude-ads GitHub integration
The claude-ads plugin is an 8,100+-star Claude Code tooling layer for Google (and Meta) Ads, fetch campaigns, inspect performance, and, depending on config, propose or apply changes. It is not a loop. It is a set of tools your loops can call.
Install it per the README, lock it to read-only credentials for the first month, and reference its commands inside your .loop files. The loop owns the schedule and the judgment; the plugin owns the API calls. That separation keeps loop logic portable, if you swap claude-ads for a GAQL script next year, the .loop files still describe the same job. A typical call site: Use claude-ads to pull yesterday's campaign performance into data/ads/spend-YYYY-MM-DD.csv, then run the pacing checks. Capability gating belongs in two places: the plugin's auth scopes (read-only vs. mutate) and the Loop Ladder file that says which loops may call mutate commands. For the broader skills ecosystem, see Metaflow's Claude Marketing Skills Ultimate Guide.
Does Google have anything like Claude Code? No. Google has Ads Scripts, automated rules, recommendations, and Smart Bidding. Those are useful. They are not a local agent with a repo, a persona file, and a cron job that reads search terms and writes a reasoned brief. Treating Ads Scripts as "Google's Claude Code" is how teams skip the safety ladder and then blame the model when a rule pauses Brand.
Cost analysis: Claude Code Google Ads loop vs. Google Ads Scripts vs. manual
The four loops above have different token profiles, and the only way to ship them safely is to know monthly cost before the cron starts. The table below is a worked example for a mid-size account: 40 campaigns, ~2,000 keywords, a noisy search-term report, and a weekly RSA / PMax asset export. Directional: file sizes will move the cents; they will not make this cost more than a freelancer at this scale.
| Approach | What you pay | What you get | What you still do by hand |
|---|---|---|---|
| Manual (no loop, no script) | 4–8 hours/week of operator time | Full judgment, no token bill | Everything: pacing, keywords, queries, ads |
| Google Ads Scripts (native automation) | $0 in Google; some Sheets quota | Threshold emails, pause rules, basic pacing | Interpretation, PMax nuance, copy briefs, client-ready notes |
| Claude Code Google Ads four-loop stack | ~$5–$9/month in tokens + Claude Code plan | Reasoned briefs, classified negatives, creative triggers, Slack | Approvals, strategy, landing pages, offer |
Scripts win on raw cost and lose on explanation, while the Claude Code Google Ads stack wins on judgment-per-dollar until exports get huge enough that token cost tracks file size instead of insight. Below tens of thousands of keywords, the loop stack is cheaper than a few hours of analyst time. Above that, keep Scripts for thresholds and keep Claude Code Google Ads for the twice-weekly reasoning jobs, not for dumping the whole account into context every morning.
| Loop | Cadence | Cost per run | Monthly cost |
|---|---|---|---|
| Budget pacing | Daily | ~$0.04 | ~$1.20 |
| Keyword review + bid notes | Weekly | ~$0.12 | ~$0.50 |
| Search terms + PMax negatives | 2x / week | ~$0.25 | ~$2.20 |
| Creative rotation | Weekly | ~$0.10 | ~$0.40 |
| Four-loop total | — | — | ~$4.30/month |
Those four rows are the budget you can defend in a client Slack thread, because daily pacing is cheap insurance and search-term classification is the line that actually buys back wasted spend. If you need to cut cost, do not kill pacing, drop keyword review to every other week before you drop the query loop. For /loop scheduling, see Anthropic's scheduled tasks docs. The conceptual parent is Addy Osmani's Loop Engineering essay; the GTM version is "same idea, spend money, add a kill switch."
Safety architecture: the Google Ads Loop Ladder
The Google Ads Loop Ladder (read-only → approve-and-execute → autonomous) is the governance model you tape next to the crontab. Claude Code Google Ads can waste real money in a single bad mutate. Scripts can too, but Scripts do not improvise. A model that is allowed to pause keywords will eventually pause a keyword you needed. The ladder exists so that improvisation is a feature of the brief, not a feature of the live account.
| Ladder rung | Loop is allowed to | Human role | Typical loops on this rung |
|---|---|---|---|
| Read-only | Read API or CSV, write briefs, post Slack | Review alerts; no account changes from the loop | Budget pacing, creative fatigue flags |
| Approve-and-execute | Draft mutations (pauses, negatives, tCPA notes) into a queue file | Approve or edit the queue, then run a separate apply command | Keyword pause queue, search-term negatives |
| Autonomous | Apply mutations inside a hard cap (max $ or max entities per day) | Weekly audit of apply logs; kill switch in safety.yaml | Mature pacing reallocations only, after 30+ clean days |
This ladder table is the operating agreement for every Claude Code Google Ads mutate you will ever enable, and the rule is that you do not skip rungs because a plugin demo looked smooth. Stay 30 days on read-only, then 30 on queued pauses with a human clicking apply. Autonomous is optional; many good accounts never need it. If you turn it on, cap entities changed per run, daily spend moved, brand-term pauses, and PMax asset deletion. Experimental: fully autonomous bid or budget writes from an LLM are not a published PPC best practice, lab setup on a test account, not a client default.
Error handling still applies on every rung. Missing CSV: alert and exit, do not invent spend. One-day CPA spike: do not pause; wait for the 14-day window. Stale file older than 24 hours: skip the run. Loops that keep going through bad data produce confident wrong pauses, which is worse than a missed Slack message.
Where This Goes Next
The four loops plus the Google Ads Loop Ladder (read-only → approve-and-execute → autonomous) are the asset you carry out of this article. Daily pacing, weekly keyword review, twice-weekly search terms, weekly creative triggers, one CLAUDE.md, one safety file, that is a complete Claude Code Google Ads operations stack for a small MCC. The same pattern extends to a Generate loop that drafts RSA copy from the creative briefs, but that is a separate article and a separate approval gate.
The discipline that compounds is ESG applied to PPC: Enable the persona, MCC auth, and export paths once; Schedule the four loops at cadences that match how spend actually moves; Govern them with the ladder so a clever brief cannot become a live pause. Once those four loops run for a month without a bad mutate, the second account you add is mostly a new customer ID.
Metaflow is built for this motion. The platform ships marketing agents that hold your positioning, connected ad accounts, and brand rules as durable context, and pause for approval before anything spends, the same boundary the Loop Ladder enforces on raw Claude Code. If you want the workflows and skills without owning the cron yourself, that is the layer Metaflow adds. For the broader skills ecosystem, see the Claude Marketing Skills Ultimate Guide; for agency deployment, see Best Claude Code Workflows for Marketing Agencies.
Frequently Asked Questions
Can Claude Code run Google Ads? Yes. Claude Code Google Ads setups read the Google Ads API (or scheduled CSV exports) and reason over spend, keywords, search terms, and creatives on a clock. The four loops cover pacing, keyword review, negatives, and creative triggers. They do not replace Smart Bidding; they sit on top and decide what a human should approve. Metaflow's marketing agents use the same approve-before-mutate boundary if you want that ladder without maintaining cron yourself.
Is $20/day enough for Google Ads with Claude Code? Yes, as an ad-spend floor for a tightly themed search campaign, Claude Code Google Ads loops do not require a large budget to be useful. A $20/day account still overpaces, still collects junk queries, and still ships tired RSAs. Do not confuse $20/day in Ads with Claude's ~$20/month Pro plan: token cost for the four-loop stack is a few dollars a month on top. Metaflow does not change the $20/day media math; it changes whether the morning check actually runs.
Does Google have anything like Claude Code? No. Google has Ads Scripts, automated rules, recommendations, and Smart Bidding, none of which is a local LLM agent with a repo, a persona, and a /loop schedule. Scripts are native automation inside Google's sandbox; Claude Code is a reasoner you schedule yourself.
How is Claude Code loop different from Google Ads Scripts? Google Ads Scripts (native automation) run JavaScript inside your account on Google's scheduler and fire if-then rules: pause, email, change budget. A Claude Code loop reads the same reports, classifies them in natural language, drafts the brief, and (on later ladder rungs) queues a mutation for approval. Scripts are cheaper for thresholds. Loops are better when the job is "explain this search term and recommend a negative." Use both: Scripts for kill-switches, Claude Code Google Ads for the Tuesday query review.
Sources
- GitHub, claude-ads plugin, 8,100+-star Claude Code Google Ads tooling layer
- Claude Code official docs on scheduled tasks,
/loopcommand reference - Addy Osmani, Loop Engineering, origin of the loop engineering concept
- Metaflow, Claude Code Loop Engineering for Modern GTM, hub article for this cluster
- Metaflow, Claude Marketing Skills Ultimate Guide
- Metaflow, Best Claude Code Workflows for Marketing Agencies
- Metaflow, Claude Code SEO loops
- Metaflow, Claude Code Meta Ads loops





