gads_create_ad_group
Google Ads write medium risk
Part of the Google Ads Manager Agent.
What it does
Create an ad group inside an existing Search/Display/Video/App/Demand Gen campaign via AdGroupService.MutateAdGroups. Required inputs: campaign (resource name or campaign_id), name (unique within the campaign), and type (AdGroupType, e.g. SEARCH_STANDARD, DISPLAY_STANDARD, VIDEO_RESPONSIVE) — except in App (MULTI_CHANNEL) and Demand Gen campaigns, whose ad groups Google creates WITHOUT a type: omit type there (the tool reads the campaign's channel to confirm). For Demand Gen, gads_create_demand_gen_ad creates the ad group and its ad together. Optional: cpc_bid_micros / cpm_bid_micros (currency*1e6), status (omitted, Google creates the ad group ENABLED, and it serves once its campaign is enabled: pass PAUSED to hold it), and targeting restriction settings. Returns the created ad_group resource name(s) and id(s). PREVIEW->APPROVE->COMMIT: first call runs validate_only=true (dry run that executes nothing and surfaces editorial/structural errors), then a plain-English diff (campaign, name, type, bid) is shown, then on explicit approval it executes (atomic) and returns committed resource names with a UTC timestamp for the audit log. Accuracy: bids are micros (display value = micros/1e6, labeled with the account currency); state that a new ENABLED ad group can begin spending immediately under its campaign budget. PREVIEW SEMANTICS: the first call (no preview_id) is sent to the Google Ads API in validation mode — field, enum, policy and permission errors surface AT PREVIEW, nothing is changed, and the response returns a preview_id. To apply, show the preview to the user, get their approval, and re-call with that preview_id and IDENTICAL arguments within 30 minutes; changed arguments or an expired token fail closed to a fresh preview. validate_only=true forces another preview; validate_only=false alone never commits.
When to use it
Use when the user wants to add a new ad group to organize keywords/ads under a campaign. Always preview with validate_only first and confirm campaign, name, type and bid; default to PAUSED and only enable on explicit approval since an enabled ad group spends against the campaign budget immediately.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID; strip dashes. |
campaign | string | yes | Campaign resource name customers/{cid}/campaigns/{id} or a bare campaign_id; CID dashes stripped before use. Ad group type must be compatible with the campaign's advertising_channel_type. |
name | string | yes | Ad group name, unique within the campaign (DUPLICATE_NAME otherwise). Trimmed of leading/trailing whitespace. |
type | string | no | AdGroupType enum, normalized to upper-snake — e.g. SEARCH_STANDARD, DISPLAY_STANDARD, SHOPPING_PRODUCT_ADS, VIDEO_RESPONSIVE, HOTEL_ADS. Must match the campaign channel type. OMIT it for App (MULTI_CHANNEL) and Demand Gen campaigns: Google creates their ad groups without a type (there is NO APP_* or DEMAND_GEN_* member). Required for every other channel (omitted there, it is refused with examples). An invalid value is rejected client-side with the full allowed list. |
cpc_bid_micros | integer | no | Manual CPC bid in micros (currency*1e6 -> e.g. $1.50 = 1500000). Only valid when the campaign uses a manual/CPC-compatible bidding strategy; ignored for fully automated strategies. |
cpm_bid_micros | integer | no | CPM bid in micros for Display/Video ad groups where applicable. |
status | string | no | AdGroupStatus: ENABLED|PAUSED, enum-normalized. Omitted, Google creates the ad group ENABLED (it serves once its campaign is enabled); pass PAUSED to hold it until go-live. |
validate_only | boolean | no | Optional. true forces another preview even with a preview_id; false is DEPRECATED and no longer commits — only a valid preview_id applies the write. |
preview_id | string | no | Omit it to preview: nothing is applied, and the call returns a preview_id bound to this exact request. Pass it only after the user approves that preview in a later message, with the same arguments (leave out validate_only, and add any confirmation flag the preview names). Single-use, expires in 30 minutes; changed arguments need a fresh preview. |
Safeguards
A change in two steps. The first call previews and changes nothing; Claude shows you the preview and applies it only after you approve, within 30 minutes and with the same arguments. Every applied change goes to the audit log. How changes are approved.
Policy
Creating ad groups to host near-duplicate content that dodges a disapproval, or to fragment a disapproved ad across groups, is Circumventing Systems (egregious — immediate account suspension). The ad group's type must legitimately match the campaign channel; do not mislabel to evade a restricted-vertical eligibility check.
Reminder
Apply only the structure the user approved; never spin up ad groups to bypass enforcement, and never log bids or account identifiers beyond the audit record.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | The customer ID was not found or your token lacks access to it. | Verify the 10-digit CID (dashes stripped) and that this user authorized the account; re-auth if needed. | no |
TOKEN_REVOKED | The stored OAuth credential was revoked or expired and cannot be refreshed. | Prompt the user to reconnect their Google Ads account (needs_reauth). | no |
INVALID_ARGUMENT | The ad group could not be created — surfacing the exact Google error (e.g. ad group type incompatible with campaign channel, or duplicate name). | Surface Google's field-level message verbatim; do not guess a fix. Correct the input and re-preview. | no |
DUPLICATE_NAME | An ad group with this name already exists in the campaign. | Choose a unique name within the campaign and re-preview. | no |
PERMISSION_DENIED | The bearer token scope or the user's account role does not permit writes on this account (missing adwords scope or out-of-bearer-scope account). | Confirm the adwords scope and an editor/admin role on the requested CID; do not attempt out-of-scope writes. | no |
MANAGER_ACCOUNT_WRITE | This is a manager (MCC) account; ad groups cannot be created on it. | Target a client account under the manager, not the MCC. | no |
PARTIAL_FAILURE | A bulk create partially succeeded: some ad groups were created, others were rejected with row-level errors. | Return success:true with warnings listing each failed row, its index, and Google's error; re-preview only the failed rows. | no |
RESOURCE_EXHAUSTED | Rate/quota limit hit (HTTP 429). | Retry with exponential backoff 5->10->20s capped at 60s, honoring any retryDelay. | yes |
PLATFORM_UNAVAILABLE | Google Ads API returned a 5xx / internal error. | Retry the idempotent preview; for commit, re-check state before retrying to avoid duplicates. | yes |
Edge cases
- Manual cpc_bid_micros on an automated-bidding campaign is ignored by Google — warn the user it has no effect.
- Ad group type must match campaign channel (e.g. SEARCH_STANDARD only in a SEARCH campaign) or validate_only returns INVALID_ARGUMENT.
- Default API status is ENABLED and the tool sends a status only when given: pass PAUSED so the group does not serve once its campaign goes live.
- One ad group per call; the commit is atomic (all or nothing).
- Preview-state TTL: if the user approves after the preview token expires, re-run validate_only before committing.
- validate_only does not execute and does not return a resource name — never present a preview as a committed change.
- Expired access token mid-call -> refresh once and retry; if refresh fails, return TOKEN_REVOKED.