Google Ads

Connect Google Ads to your brain

Your brain does most of this for you now. You paste one prompt, it does the setup, and it stops to ask you whenever it needs a click in your browser.

The prompt

Paste this into your brain
Set up my Google Ads API connection. Follow these steps in order. Do the work yourself wherever you can, and give me ONE browser step at a time for the rest: the exact page, the exact thing to click, and what I should see after. Wait for me to say done before the next one.

Rules:
- Never show a secret in this conversation (a client secret or a refresh token). Show at most the first 10 characters.
- No developer token. Google retired them on 9 September 2026. Ignore any guide in this brain that asks for one, or that says the sign-in app can stay in "Testing".
- Read only. Don't change anything in any Google Ads account.

STEP 1. Check what I already have.
Run: node .claude/skills/gads-proxy/scripts/query.cjs --check
If "yaml" or "proxy" comes back as found, tell me a connection already exists and stop. If that script is missing, my brain is out of date: run the brain update yourself, then carry on from here.

STEP 2. The Google Cloud project.
Check whether the gcloud command line tool is installed (gcloud --version). If it isn't, ask me whether to install it or to do this step by clicks.
With gcloud: have me sign in (gcloud auth login opens my browser). Then create a new project named "Google Ads API" and switch the API on with: gcloud services enable googleads.googleapis.com --project <the new project id>
Without gcloud: send me to console.cloud.google.com to create a project, then APIs & Services, Library, search "Google Ads API", Enable.
Tell me to keep this project. My access is tied to it.

STEP 3. The sign-in app (me, in the browser).
Send me to https://console.cloud.google.com/auth/overview?project=<project id> and have me: click Get started; type an app name and pick my email; for Audience choose Internal if I sign in with a Google Workspace account, otherwise External; add my email as the contact; agree and click Create.
If I chose External: next have me open the Audience tab and set the publishing status to "In production". Don't let me skip this. Left in "Testing", Google cancels my sign-in every 7 days.

STEP 4. The OAuth client (me, in the browser).
From the same page: Create OAuth client. Application type: Desktop app. Any name. Leave the box "Use this client for an AI-powered agent" UNTICKED. Create, then Download JSON.
Ask me where the file was saved and read it from there. Never ask me to paste what's in it.

STEP 5. The sign-in.
Using the client ID and secret from that file, run a loopback sign-in yourself: listen on http://127.0.0.1 on a free port, open Google's sign-in address in my browser with the scope https://www.googleapis.com/auth/adwords, access_type=offline and prompt=consent, wait for me to click Allow, then exchange the code for a refresh token.
If I see an "unverified app" warning, tell me to click Advanced and continue. It's my own app.

STEP 6. Save the login.
Write the file google-ads.yaml in my home folder with three lines: client_id, client_secret and refresh_token. On a Mac or Linux, lock it to my user (chmod 600). Tell me I can now delete the JSON file I downloaded.

STEP 7. Explorer access (me, in the browser).
Send me to https://console.cloud.google.com/google/ads-apis/overview?project=<project id> and have me apply for Explorer access. If Google asks what I'm building, the answer is: AI-assisted analysis and reporting of my own Google Ads accounts, with every change approved by me.
It's usually approved within minutes. If Google refuses, check the project's billing: a project on the Google Cloud free trial, or with suspended billing, gets refused. Removing billing from the project fixes it, and the Google Ads API costs nothing.

STEP 8. Prove it.
Ask me for my 10-digit Google Ads account number. Then run:
node .claude/skills/gads-proxy/scripts/query.cjs --customer=<account number> --query="SELECT campaign.name, metrics.cost_micros FROM campaign WHERE segments.date DURING YESTERDAY ORDER BY metrics.cost_micros DESC LIMIT 5"
Show me yesterday's spend by campaign as a small table.
- If the error says the project is only approved for test accounts, Explorer access is still pending. Wait a few minutes and run it again.
- If the error is a permission error that mentions login-customer-id, my account sits under a manager account. Ask me for that manager's 10-digit number, add it to google-ads.yaml as login_customer_id, and run it again with --login=<manager number>.

Finish by telling me, in two sentences, what's now set up and where the login is saved.

The four things you click

  1. Set up the sign-in app. In Google Cloud Console, open Google Auth Platform and click Get started. Give the app a name. For Audience, choose Internal if you're on Google Workspace. Otherwise choose External, and then set it to "In production". Add your contact email and click Create.
  2. Create the OAuth client. Choose Desktop app. Leave "Use this client for an AI-powered agent" unticked, then click Download JSON.
  3. Approve the sign-in. Your browser opens and Google asks you to approve the connection.
  4. Apply for Explorer access. You do this on the Google Ads API page in Google Cloud Console. It's usually approved in minutes.

Three things that catch people out

  • You don't need a developer token. Google retired them on 9 September 2026.
  • Don't leave the app in "Testing". Google cancels the sign-in every 7 days if you do.
  • Your ads account might sit under a manager account. If it does, you'll need that manager's 10-digit number.

If you'd like every step written out, read the full Google Ads API guide.