Google Ads Scripts logo

Google Ads Scripts

Community
henkisdabro
google-ads-scripts

Expert guidance for Google Ads Script development including AdsApp API, campaign management, ad groups, keywords, bidding strategies, performance reporting, budget management, automated rules, and optimisation patterns. Use when automating Google Ads campaigns, managing keywords and bids, creating performance reports, implementing automated rules, optimising ad spend, working with campaign budgets, monitoring quality scores, tracking conversions, pausing low-performing keywords, adjusting bids based on ROAS, or building Google Ads automation scripts. Covers campaign operations, keyword targeting, bid optimisation, conversion tracking, error handling, and JavaScript-based automation in the Google Ads scripts editor. Do NOT use for the Google Ads API (Python/REST/gRPC) - this is Ads Scripts only. Do NOT use for Microsoft Ads, Meta Ads, or other non-Google ad platforms.

Overview

Publisherhenkisdabro
Repositorywookstar-claude-plugins
Skill namegoogle-ads-scripts
Stars
88
Forks
12
Bundled files
7
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by henkisdabro on GitHub. Read the source before you install it.

Installation

Install the Google Ads Scripts AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/henkisdabro/wookstar-claude-plugins.git /tmp/wookstar-claude-plugins
mkdir -p .claude/skills
cp -r /tmp/wookstar-claude-plugins/plugins/google-ads-scripts/skills/google-ads-scripts .claude/skills/google-ads-scripts
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Google Ads Scripts in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Google Ads Scripts on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Google Ads Scripts is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Google Ads Scripts

Overview

Guidance for developing Google Ads Scripts using the AdsApp API. Automate campaign management, bid optimisation, performance reporting, and bulk operations through JavaScript running in the Google Ads editor.

Core Capabilities

1. Campaign Operations

Manage campaigns programmatically - creation, modification, status changes, bulk updates. Use AdsApp.campaigns() with conditions to filter by status, budget, name patterns, or type. Apply labels for organisation.

2. Keyword & Bid Management

Automate keyword targeting and bid adjustments based on performance. Filter by quality score, adjust max CPC bids based on ROAS/CPA targets, add/remove negative keywords, and implement bid optimisation algorithms.

3. Performance Reporting

Generate custom reports using campaign, ad group, keyword, and ad statistics. Retrieve metrics for custom date ranges, calculate derived metrics (CTR, CPC, conversion rate), and export data to Google Sheets.

4. Budget Management

Control spending and allocate budgets across campaigns. Get/set daily campaign budgets, monitor spend against thresholds, pause campaigns when limits are reached, and distribute budgets based on performance.

5. Automated Rules & Optimisation

Build intelligence into campaign management with automated decision-making. Pause low-performing keywords, increase bids for high-performers, adjust budgets based on day-of-week patterns.

6. Error Handling & Resilience

Implement robust error handling for API limits, quota issues, and runtime errors. Use try-catch blocks, null checks, sheet-based logging for audit trails. Be aware of the 30-minute execution limit.

Quick Start

The most common pattern - pause keywords with low quality scores and high spend:

javascript
function pauseLowQualityKeywords() {
  const keywords = AdsApp.keywords()
    .withCondition('ad_group_criterion.status = "ENABLED"')
    .withCondition('ad_group_criterion.quality_info.quality_score < 4')
    .withCondition('metrics.cost_micros > 100000000') // 100 in account currency
    .forDateRange('LAST_30_DAYS')
    .get();

  let count = 0;
  while (keywords.hasNext()) {
    keywords.next().pause();
    count++;
  }
  Logger.log(`Paused ${count} low-quality keywords`);
}

Best Practices

  • Batch operations - collect entities first, then process; avoid individual API calls in loops
  • API-level filtering - use .withCondition() instead of filtering in JavaScript
  • Error handling - wrap operations in try-catch, log errors to sheets or email
  • Execution limits - use .withLimit() and batch processing for large accounts (30-min timeout)
  • Micros conversion - currency values are in micros (divide by 1,000,000 for display)
  • Audit logging - log all changes to Google Sheets with timestamps

See references/best-practices.md for detailed code examples of each practice.

Integration with Other Skills

  • google-apps-script - Use for Google Sheets reporting, Gmail notifications, Drive file management, and trigger setup
  • google-analytics - Combine with GA4 Measurement Protocol for tracking script-triggered events
  • google-tagmanager - Coordinate with GTM configurations for holistic tracking

Validation & Testing

Use the validation scripts in scripts/ for pre-deployment checks:

  • scripts/validators.py - Validate campaign data, bid values, budget amounts before applying changes

Troubleshooting

Common issues:

  1. Execution timeout - reduce scope with .withLimit() or process in batches
  2. Quota exceeded - reduce API call frequency, use cached data
  3. Type errors - remember micros conversion for currency values
  4. Null values - always check for null before accessing properties

Use Logger.log() for debugging - view logs via View > Logs in the script editor.

References

Load these on demand for detailed documentation:

  • references/ads-api-reference.md - Complete AdsApp API reference including selectors, methods, conditions, statistics, and enterprise patterns
  • references/examples.md - Detailed code examples: pause low-quality keywords, optimise bids by ROAS, export campaign performance to Sheets
  • references/best-practices.md - Best practices with code blocks: batch operations, API filtering, error handling, micros conversion, audit logging
  • references/patterns.md - Reusable automation patterns: conditional bid adjustment, quality score monitoring

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Google Ads Scripts AI skill do?

Expert guidance for Google Ads Script development including AdsApp API, campaign management, ad groups, keywords, bidding strategies, performance reporting, budget management, automated rules, and optimisation patterns. Use when automating Google Ads campaigns, managing keywords and bids, creating performance reports, implementing automated rules, optimising ad spend, working with campaign budgets, monitoring quality scores, tracking conversions, pausing low-performing keywords, adjusting bids based on ROAS, or building Google Ads automation scripts. Covers campaign operations, keyword targ...

Why use Google Ads Scripts on TypingMind?

Because you install it once and use it with any model. Google Ads Scripts is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Google Ads Scripts in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/henkisdabro/wookstar-claude-plugins/tree/main/plugins/google-ads-scripts/skills/google-ads-scripts. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Google Ads Scripts?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Google Ads Scripts?

As many as you like. As long as a model supports skills, you can use Google Ads Scripts with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Google Ads Scripts AI skill free?

It is published on GitHub by henkisdabro. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇