What you’ll learn: How to build automated bid management, search query mining, and creative testing systems. Includes a complete Google Ads automation workflow you can implement in stages.
Based on 15 years managing campaigns across Google, Microsoft, Meta, and Amazon, the highest-impact automation covers three areas: (1) search query management—finding waste and finding opportunity in the queries triggering your ads; (2) budget pacing and allocation—ensuring spend flows to the highest-performing areas; and (3) creative testing—systematically testing and rotating ad variations based on performance.
Stage 1: Automated Search Query Mining (Week 1)
Install the negative keyword management script and configure it for your account:
// Install from: github.com/itallstartedwithaidea/googleads_negatives_script
// This script:
// 1. Pulls all search queries from the last 30 days
// 2. Identifies queries with spend but zero conversions
// 3. Cross-references against your existing negative lists
// 4. Outputs recommendations to a Google Sheet
// 5. Optionally auto-adds negatives above a cost threshold
var CONFIG = {
SPREADSHEET_URL: 'https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID',
COST_THRESHOLD: 10.00, // Flag queries costing > $10 with 0 conversions
AUTO_NEGATIVE: false, // Set true to auto-add (start with false!)
LOOKBACK_DAYS: 30,
IGNORE_CAMPAIGNS: ['Brand'] // Don't touch brand campaigns
};
FROM MY EXPERIENCE: Always start with AUTO_NEGATIVE set to false. Review the recommendations manually for the first 2 weeks. I have seen scripts negative-out converting queries because of attribution lag. Once you trust the logic, then automate.
Stage 2: Budget Pacing and Projection (Week 2)
// Install from: github.com/itallstartedwithaidea/google_ads_budget_projection_script
// This script calculates:
// - Daily spend rate vs monthly budget
// - Projected end-of-month spend
// - Days remaining and required daily adjustment
// - Over/under pacing percentage
var BUDGETS = {
'Brand Campaign': 5000, // Monthly budget
'Non-Brand Search': 15000,
'Performance Max': 8000,
'Display Remarketing': 3000
};
📦 GitHub: https://github.com/itallstartedwithaidea/google_ads_budget_projection_script — Budget pacing with daily projections, Sheets output, and email alerts
Stage 3: Automated Label Management (Week 3)
// Install from: github.com/itallstartedwithaidea/
// google_ads_create_labels_assign_automatically
// This script automatically labels campaigns based on performance:
// - 'Top Performer' for campaigns above ROAS target
// - 'Needs Review' for declining campaigns
// - 'Budget Alert' for overpacing campaigns
// Labels make filtering and reporting dramatically easier
📦 GitHub: https://github.com/itallstartedwithaidea/google_ads_create_labels_assign_automatically — Auto-label campaigns based on performance criteria you define
Stage 4: AI-Powered Analysis Layer (Week 4)
Now connect the data from Stages 1-3 to Claude for intelligent analysis. This is the bridge between scripts and agents:
import anthropic
import gspread
# Pull data from the Sheets your scripts write to
gc = gspread.service_account(filename='credentials.json')
sq_sheet = gc.open('Search Query Analysis').sheet1
budget_sheet = gc.open('Budget Pacing').sheet1
sq_data = sq_sheet.get_all_values()
budget_data = budget_sheet.get_all_values()
# Feed to Claude for cross-analysis
client = anthropic.Anthropic()
response = client.messages.create(
model='claude-sonnet-4-20250514',
max_tokens=3000,
messages=[{
'role': 'user',
'content': f'''You are a senior PPC strategist.
Here is this week's search query waste analysis:
{sq_data[:50]} # Top 50 queries
Here is the budget pacing data:
{budget_data}
Provide a weekly optimization plan that:
1. Prioritizes the highest-impact actions
2. Reallocates budget from wasted queries to underspending campaigns
3. Identifies any patterns across campaigns
4. Estimates dollar impact of each recommendation'''
}]
)
print(response.content[0].text)
The four-stage workflow above is a simplified version of what GoogleAdsAgent.ai runs continuously. Each stage corresponds to a sub-agent: Search Query Optimization (Stage 1), Budget Orchestration (Stage 2), Campaign Intelligence (Stage 3), and the AI analysis layer that coordinates them all (Stage 4). The difference is scale, reliability, and the 15 years of pattern recognition encoded in every decision the system makes.
Website: https://googleadsagent.ai | GitHub: https://github.com/itallstartedwithaidea | Tools: https://googleadsagent.ai/tools
About the Author
John Williams is a Senior Paid Media Specialist at Seer Interactive with 15+ years managing $48M+ in digital ad spend across Google, Microsoft, Meta, and Amazon. Founder of It All Started With A Idea and creator of GoogleAdsAgent.ai. Speaker at Hero Conf on AI in advertising. Former WSU football player and current assistant football coach at Casteel High School, AZ.
Get a free 30-day audit of your advertising accounts. John will personally review your setup and provide actionable recommendations.
John will review your account and reach out within 24 hours.