Aller au contenu principal
Step-by-step guide

How to Automate Ad Operations in Google Ad Manager

Short answer

Automating ad operations in Google Ad Manager means letting an AI agent do the repeatable, verifiable work (reports, checks, audits) and asking a human to approve anything that writes to the network. Start with one read-only workflow, such as the morning delivery report, measure it against your manual baseline, and only then add approved changes.

OA
OrbiAds Academy
Published June 10, 2026 · Updated September 30, 2026 · 10 min read

What to automate first, and what to keep human

Not every task deserves automation. Three criteria filter the list quickly. A task is a good candidate when it is repeatable (same steps every time), low-risk (a mistake is cheap to undo or cannot reach production) and verifiable (you can check the output against a number, a list or a GAM field).

Automate firstAutomate with a human approvalKeep human
Morning delivery and pacing reportTargeting changes on a live line itemPricing and yield strategy
Under-delivery and budget alertsArchiving unused ad unitsCommercial negotiation, make-goods
Targeting and key-value checks before pushActivating or pausing line items in batchesLaunching a campaign with no review
Inventory hygiene audit (read-only)Creating ad units or placementsAnything you could not explain to the advertiser

The pattern is always the same: read first, propose second, write last. An agent that only reads and summarizes gives you value on day one with no risk to the network.

The setup in one paragraph

You need an AI agent that can call Google Ad Manager through a controlled interface. With OrbiAds, that interface is an MCP server (or the CLI): the agent does not write SOAP or REST calls itself, it picks from a catalogue of named tools such as reporting, line_items, targeting and inventory, each with typed parameters. If the concept is new, read what a Google Ad Manager MCP server is, then follow the MCP quickstart. Connect a network with read access first.

Workflow 1: reporting (the morning delivery check)

  • Inputs: the GAM network, a date range (yesterday and month-to-date), and the thresholds you care about.
  • What the agent does: runs reporting.check_underdelivery_alerts (default threshold 0.8 on the delivery indicator) and reporting.check_budget_alerts (default 95% spent), then pulls detail with fetch_delivery_report or run_gam_report. It ranks the problems and writes a short summary.
  • Human control point: none is needed for the run itself, because the workflow is read-only. The human decides what to escalate. Run it for the first two weeks next to your manual check and compare the two.
  • Output: a short message or a CSV (export_report_csv, get_report_download_link) with flagged line items, their delivery indicator and a suggested next check. A step-by-step version with Claude is in the daily report guide.

Workflow 2: targeting validation before anything is pushed

  • Inputs: a trafficking brief or a line item draft: ad units or placements, geo, key-values, sizes.
  • What the agent does: checks that every key and value exists (targeting.list_custom_targeting_keys, search_custom_targeting, get_custom_targeting_values), that the ad units exist and are active (targeting.search_ad_units), and that the combination can serve (targeting.get_inventory_forecast). For a line item that already exists it calls line_items.verify.
  • Human control point: the agent reports a pass or a list of problems. Nothing is created until a person reads that list. Silent key-value typos are the classic failure: a value that does not match the ad requests targets nothing, and the line item simply does not deliver. Details in targeting validation and the key-values guide.
  • Output: a checklist per line item: each targeting element, found or missing, active or not, forecast available or not.

Workflow 3: inventory hygiene and unsold inventory

  • Inputs: the ad unit tree, a look-back window (for example 90 days) and your naming rules.
  • What the agent does: lists ad units with no traffic (inventory.find_inactive_ad_units, 1 to 365 days, default 90), runs inventory.audit_inventory or audit_skill.hygiene_check for structural issues, and pulls reporting.fetch_inventory_report to see where inventory goes unsold. See unsold inventory in GAM.
  • Human control point: the audit is read-only. Archiving (inventory.archive_inactive_ad_units) is a write: it defaults to dry_run = true and returns a preview plus a confirmation_token. A person reads the list of ad units before confirming. Google's documentation states that an archived ad unit becomes ineligible for delivery and leaves the targeting picker, so a wrong archive has real consequences.
  • Output: a list of candidate ad units to archive, a list of structural findings, and a list of unsold-inventory hotspots.

A worked example: an under-delivering line item, end to end

The numbers below are illustrative, invented to show the shape of the workflow. They are not a customer result, and the tool output is simplified.

Step 1: detect (read-only)

At 08:00 the agent runs the under-delivery check. GAM exposes a deliveryIndicator on each line item, with an expectedDeliveryPercentage and an actualDeliveryPercentage. The check flags items whose actual-to-expected ratio falls below the threshold.

Line itemTypeExpectedActualRatioFlag
ACME_Autumn_ROS_300x250 (id 4821330)STANDARD62%41%0.66below 0.8
ACME_Autumn_Video_PrerollSPONSORSHIP55%54%0.98ok
Brand_Sport_TakeoverSPONSORSHIP70%66%0.94ok

Step 2: diagnose (read-only)

The agent reads the line item (line_items.get_full, line_items.verify) and checks its targeting. Google's troubleshooting guide lists targeting that does not match ad requests, insufficient inventory and overbooking among the common causes, and the agent works through them in that order. In this example it finds that the line item targets the key-value section=sport, while the site tags its pages with section=sports.

{
  "lineItemId": "4821330",
  "finding": "targeted value does not match ad requests",
  "targeted": {"key": "section", "values": ["sport"]},
  "valuesInNetwork": ["sports", "news", "finance", "sport"],
  "suggestedChange": {"key": "section", "values": ["sport", "sports"]},
  "risk": "low: adds an existing value, removes nothing"
}

Step 3: propose (dry run)

The agent calls line_items.update_targeting with dry_run = true (the default). Nothing changes in GAM. The response contains a preview of the change and a confirmation_token.

Step 4: human approval

The trafficker reads the proposal: one value added, nothing removed, no other line item touched. They also check that widening the targeting does not collide with an exclusivity agreement. It does not, so they confirm.

Step 5: apply

The agent repeats the call with dry_run = false and the token. The operation is logged with tenant, timestamp and job identifier, and can be read back with audit.query_audit_log.

Step 6: verify

The agent re-runs line_items.verify right away, then checks the delivery indicator after the next reporting cycle. A fix is only a fix when the number moves: if the ratio has not improved after a day or two, the agent reports it instead of stacking more changes.

CheckBeforeAfter
Actual vs expected delivery41% vs 62%Goal: ratio back above 0.8 within a day or two
Site tags matched by the targeting1 of 2 values2 of 2 values

How to measure whether it works

Do not trust a percentage from a vendor, including us. Measure your own baseline for two weeks before you automate anything, then compare. Four indicators are enough:

  • Time spent on recurring reports: minutes per day on the morning check, counted by the person doing it.
  • Trafficking error rate: line items that needed a correction after going live, divided by line items created, per month.
  • Time to fix a delivery issue: from the moment an under-delivery shows up in GAM to the moment a fix is confirmed.
  • Alert precision: of the alerts the agent raised, how many a human judged relevant. If it is low, tighten the thresholds before you widen the scope.

An example of assumptions, to adapt: if the manual morning check takes 25 minutes and reviewing the agent's summary takes 5, you gain 20 minutes per working day. That is arithmetic on your own inputs, not a promise.

Guardrails and common pitfalls

  • Start read-only. check_credentials reports whether the session can write. Stay on reads until the reports match what your team sees.
  • Use the dry run for every write. Write actions such as line_items.update, update_targeting and archive_inactive_ad_units default to dry_run = true and need a confirmation_token from the preview.
  • Scope the network. If you have access to several networks, confirm the active one (network.get_network_info, list_accessible_networks) before any write. Acting on the wrong network is the most expensive mistake.
  • Give least privilege. GAM roles still apply: the agent acts on behalf of a user and cannot do more than that user's role allows. Google requires specific permissions even to archive ad units. See the security documentation.
  • Keep an audit trail and review it weekly during the first month.
  • Do not automate what you cannot verify. If there is no number or GAM field to check the result against, keep a human in the loop.
  • Do not batch before you trust. Single line items first, then batches (pause_batch, activate_batch).

Next steps

  1. Pick one of the three workflows and run it read-only for a week.
  2. Connect your network with the getting started guide or the MCP quickstart.
  3. Add the validation step from targeting validation before your next push.
  4. See how the Ad Ops automation platform packages these workflows for teams.

Google sources: Troubleshoot line item delivery, Deactivate or archive an ad unit, Target key-values and the LineItem reference (v202605).

Frequently asked questions

What does it mean to automate ad operations?

It means delegating repeatable, verifiable tasks (delivery reports, targeting checks, inventory audits) to software or an AI agent, while people keep approval over anything that changes the ad server.

What should you automate first in Google Ad Manager?

Start with read-only work: a daily delivery and pacing report, then targeting validation before push, then an inventory hygiene audit. They are repeatable, low-risk and easy to verify.

Is it safe to let an AI agent change GAM?

It can be, if writes are gated. In OrbiAds, write actions default to dry_run = true and need a confirmation_token from the preview before anything is applied. GAM roles and network scoping still apply.

How do you measure the result?

Take a two-week baseline first, then track time on recurring reports, trafficking error rate, time to fix a delivery issue, and the share of agent alerts a human judged relevant.

Run your first automated workflow

Connect a network read-only, run the morning delivery check, and keep every write behind a preview and a confirmation.

Get started