Recipe
Build a Google Ads Search campaign from your Shopify store with Claude Code
Claude Code reads your Shopify products and Google's Keyword Planner through the Adrails MCP server, then prepares a Search campaign as one proposal. You confirm it on the review page, Google validates the request, and everything is created paused. Five tools, about thirty minutes, and no developer token.
By Thomas, founder of Adrails · Reviewed Oct 4, 2026
The recipe
From catalogue to paused campaign
Four reads, one proposal. Nothing reaches Google Ads before you confirm it on the review page.
01
Read the catalogue
store_products returns up to 50 products with title, handle, price range, inventory, status, type and vendor.
02
Check real searches
google_keyword_planner gives monthly searches and the top-of-page bid range, for the countries and language you name.
03
Read the account
campaigns_structure lists what already runs, with its ids, and the conversion actions the account records.
04
Build, paused
google_ads_build prepares one proposal: the campaign, its ad groups, their keywords and responsive search ads.
05
Confirm, then switch on
Open the review link, check each field, confirm. Google creates everything paused; a second proposal switches it on.
01
What you get, and how long it takes
At the end, your Google Ads account holds a new Search campaign, paused. It has one ad group per product family, keywords chosen on Keyword Planner volumes, and one responsive search ad per group pointing at the product or collection page. It was built from your Shopify catalogue as Adrails synced it, not from a spreadsheet.
The whole recipe takes about thirty minutes the first time, most of it reading the keyword table and the preview. Claude Code calls five Adrails tools in sequence. Four of them read. The fifth prepares the build as one proposal you confirm on the review page, and the sixth, optional, switches the campaign on the same way.
02
Before you start
Connect Adrails to Claude Code first. The setup article linked below covers the command, the sign-in and the consent screen, so this recipe starts once /mcp shows adrails as connected. On the consent screen, keep Read workspace data and select Prepare advertising changes, which only an owner or admin can grant.
Manage campaign assets is not needed: the build is a proposal, not a draft. Neither is Manage integrations, unless you want Claude Code to refresh the account after the build with meta_sync.
- An Adrails workspace on an active plan: Preview refuses every proposal.
- Shopify connected under Integrations, so store_products has a catalogue to read.
- A Google Ads account connected to the workspace. Google Ads opens once Google finishes verifying Adrails. Connect Meta for now. A workspace that already connected Google Ads can follow this recipe today.
- Permissions: Read workspace data, Prepare advertising changes. Your role must be owner or admin.
03
1. Read the catalogue with store_products
store_products reads the products of the connected stores: title, handle, minimum and maximum price with the currency, total inventory, status, product type and vendor. It takes three optional inputs: limit, 1 to 50, search, which filters on the title, and status, for active products only. Each result also names the store it came from.
Ask for active products and group them by product type or vendor: those groups become the ad groups. Fifty products come back per call, so a large catalogue is read by product type or by search term rather than all at once.
- Prompt: List my active Shopify products with store_products, 50 at most, with title, handle, price range and inventory. Group them by product type.
- Returned: one row per product, the store it comes from, and when Adrails last synced it.
04
2. Check search volumes with google_keyword_planner
google_keyword_planner calls Google's Keyword Planner for your Google Ads account. In ideas mode it suggests keywords from a few words or from an https page of your site, most searched first. In volumes mode it returns, for up to 200 keywords, the monthly searches and the top-of-page bid range. Counts are for the countries and language you give, up to ten countries, or for everywhere when you give none.
Start with ideas from a collection page, then run volumes on the shortlist. Keep the figures: the build step cites them as the reason for each keyword, and the preview shows where they came from.
- Prompt: Call google_keyword_planner on account <id> in ideas mode with the url https://yourstore.com/collections/<handle>, countries France, language French.
- Prompt: Now run volumes on the 30 best ideas, same countries and language, and table them with the bid range.
- Returned: each keyword with monthly searches and the top-of-page bid range, from Google, for the countries given.
05
3. Read the account with campaigns_structure
campaigns_structure returns how the account is built as of the last sync. Every campaign comes with its type, status, budget and bidding, every ad group with its keywords, match types and quality scores. Every ad comes with its headlines, descriptions, paths, final URL and review status. It also lists the conversion actions the account records.
Read it before building for two reasons. The new campaign should not duplicate keywords a running campaign already buys. And a conversion goal in the build, Purchase for a store, must be a category the account records; otherwise leave the goal out and the campaign bids for the account's own goals.
- Prompt: Read campaigns_structure for account <id>. Which Search campaigns run, which keywords do they buy, and which conversion actions does the account record?
- Returned: campaigns, ad groups, keywords, ads and conversion actions, with the ids to reuse.
06
4. Build the campaign, paused, with google_ads_build
google_ads_build prepares one proposal to create a new campaign of type SEARCH with its ad groups, keywords and ads. The campaign carries a name, a daily budget in the account's currency, a bidding strategy, at least one place or radius, and at least one language. Bidding is one of Maximize conversions with an optional target CPA, Maximize conversion value with an optional target ROAS, Maximize clicks, Manual CPC or Target impression share.
Each ad group carries a name, keywords in Google's syntax, brackets for exact match, quotation marks for phrase match, a leading minus to exclude, and responsive search ads. An ad has 3 to 15 headlines of 30 characters, 2 to 4 descriptions of 90, an https final URL and two optional path words. Extensions such as sitelinks and callouts carry only what you gave or the site states, never an invented offer or price.
The tool returns the preview field by field, an action id, an expiry 30 minutes later and a review link. Nothing has been applied. The call carries an idempotency key, so a retry reports the same proposal instead of building twice.
- Prompt: Build a paused Search campaign with google_ads_build on account <id>: name Shop Search FR, daily budget 30, Maximize conversions, location France, language French. One ad group per product type from step 1, with the exact and phrase keywords from step 2 that have at least 500 monthly searches. One responsive search ad per group, 10 headlines and 3 descriptions written from the product titles, final URL the collection page. No price or discount in the copy.
- Returned: a pending status, the preview, the action id and the review link under /oauth/actions/.
07
5. Confirm on the review page
Open the review link. The Review advertising change page names the AI client, the workspace and the ad account, then shows the campaign, each ad group, each keyword and each ad. Confirm the change there, or decline it. Only the person who authorized the connection can confirm it, signed in to Adrails, still an owner or admin, on an active plan.
Once you confirm, Google validates the exact request and creates the campaign paused, with its ad groups and ads under it. Nothing spends. Follow the build with jobs_status, kind publication, which reports its state, the publish date or Google's refusal in words. actions_recent lists the action with its execution state.
08
6. Switch it on
Everything google_ads_build creates stays paused until someone switches it on. From Claude Code, that is a second proposal: campaigns_set_status with the campaign's id, entityType campaign and status ACTIVE. Adrails reads Google Ads live for that id, so the proposal works as soon as the campaign exists. The campaign's id is in Campaigns in Adrails, or in campaigns_structure after a refresh of the account.
campaigns_launch_activate does not apply here: it switches on what a Meta launch created, by its launch id. You can also switch the campaign on from Campaigns in Adrails or in Google Ads itself; the pause and resume are reversible from either side.
09
Pitfalls
Most failed runs come from inputs, not from the tools. Google refuses a conversion goal the account does not record, a headline over 30 characters or a final URL that is not https. The preview shows these before you confirm, and jobs_status reports Google's reason after.
- Rate limits: 60 calls and 10 proposals a minute per connection, and one call at a time. Claude Code retries a refused call; let it.
- Results are capped at 256 KB. Read 50 products at a time, and narrow campaigns_structure with a campaignId on a large account.
- Keyword Planner takes 200 keywords and 10 countries per call. Its figures are for the countries given, or everywhere when none is.
- A proposal expires 30 minutes after it is prepared. Confirm it while the preview is fresh, or ask again.
- A new Search campaign starts with no conversions. Give it two complete weeks before budget_recommend has anything to compare.
- Inventory in store_products is as of the last sync. integrations_status says how fresh it is.
Prompts to paste
Five prompts, five results
Replace the account id, the country and the language with yours. Claude Code picks the tool from the prompt.
| Step | Prompt to paste in Claude Code | What comes back |
|---|---|---|
| 1 | List my active Shopify products with store_products, 50 at most: title, handle, price range and inventory. | A table of products, with the store they come from and the sync date |
| 2 | Call google_keyword_planner on account <id> in ideas mode with the url of the collection page, countries France, language French. Then run volumes on the 30 best ideas. | Keywords with monthly searches and the top-of-page bid range |
| 3 | Read campaigns_structure for account <id>. Which campaigns run, and which conversion actions does the account record? | Campaigns with type, status, budget and bidding; ad groups with keywords; ads; conversion actions |
| 4 | Build a paused Search campaign with google_ads_build: one ad group per product family, exact and phrase keywords from step 2, one responsive search ad per group, daily budget 30, Maximize conversions, France, French. | A preview of the campaign field by field, an action id and a review link; nothing applied |
| 5 | Prepare campaigns_set_status ACTIVE for campaign <id> on account <id>, reason: build confirmed, ready to spend. | A second proposal with its review link; confirming it switches the campaign on |
Tool names and inputs from the MCP tools reference. Every proposal returns a review link and applies nothing.
Go further
Read more
- Connect Meta Ads and Google Ads to Claude and ChatGPTAdd the Adrails server to Claude, Claude Code, ChatGPT or Codex, then choose the permissions.
- Google Ads MCP serverKeyword Planner, campaign builds and edits on Google Ads, tool by tool.
- MCP tools referenceEvery tool, its inputs, what it reads or changes and who can call it.
- Shopify integrationWhat Adrails imports from Shopify and how often it syncs.
FAQ
Common questions
Does Claude Code need a Google Ads developer token?
No. Google Ads is connected once in Adrails, which holds the API access. Claude Code signs in to Adrails through the MCP connection, and tool results never contain provider credentials.
Can the campaign start spending before I confirm it?
No. google_ads_build prepares a proposal; only an owner or admin confirms it in Adrails, and the campaign is created paused. Switching it on is a second proposal, or a click in Campaigns or in Google Ads.
Which Google Ads campaign types can be built this way?
Search, Display, Demand Gen and Performance Max, through google_ads_build. A Search campaign takes responsive search ads only; Performance Max takes asset groups instead of ads.
Why does the recipe read campaigns_structure before building?
For the ids and the conversion actions. A build under an existing campaign or ad group needs their ids, and a conversion goal must be a category the account records.
What if the store has more than 50 products?
store_products returns 50 per call and filters on the title with search. Read the catalogue by product type or by search term, and build one ad group per group.