Hook Meta Ads Up to Claude Code: Reporting, Audits, and Creative Ops on Autopilot
By Jonah, Founder of FindClout — July 2026
At FindClout we track spend and performance data across dozens of live campaigns for a creator distribution network that's driven 3.3B+ views for advertisers. Nobody on the team is logging into Ads Manager every morning to screenshot numbers into a spreadsheet — a script does it, and a terminal agent wrote the script. This post walks through exactly how to connect the Meta Marketing API to Claude Code, what's safe to fully automate, and what should always keep a human in the loop.
Quick definition up front, for anyone who wants the one-paragraph version: hooking Meta Ads up to Claude Code means generating a system-user access token in Business Settings, handing it to the agent, and describing the report or audit you want in plain English — the agent writes the script that calls Meta's Marketing API and does the rest.
What the Meta Marketing API actually is
The Meta Marketing API is the programmatic interface into everything you can normally see and do in Ads Manager — campaigns, ad sets, ads, insights, audiences — but accessible from code instead of clicks. Anything you can pull as a report in the UI, you can pull as structured JSON via the API, and anything you can change in the UI (pausing an ad set, adjusting a budget) you can change via the API too, which is exactly why access to it needs to be handled carefully.
Getting access: the system user token
The correct way to give an agent or a script access to your ad account is a system user, not your personal login. Here's the path:
- Go to Meta Business Settings for your Business Manager.
- Under Users, select System Users.
- Click Add, name it something like
reporting-agent, and assign it a role (Employee is fine for read-only reporting; only use Admin if the automation genuinely needs write access). - Assign the system user to the specific ad account(s) it should see — don't grant blanket access across your whole Business Manager if you only need one account.
- Click Generate New Token, select the app, and check the permissions it needs —
ads_readfor reporting,ads_managementonly if you're building something that writes changes. - Copy the token somewhere safe. This is what you hand to Claude Code.
A system user token doesn't expire when a person's session times out or they leave the company, and it's scoped precisely to what you assigned it — which makes it the right foundation for anything you're going to automate, versus reusing a personal access token that's tied to one human's login.
What to automate
Once Claude Code has the token and your Ad Account ID, here's the order I'd build in, roughly safest-and-highest-value first:
1. Daily spend / ROAS digest
A script that pulls spend, ROAS, CTR, CPM, and frequency across every active campaign and pushes a clean, formatted summary to Slack or Telegram every morning. Fully read-only, zero risk to the account, and it kills the single most repetitive part of a media buyer's day.
2. Creative fatigue detection
Frequency climbing while CTR decays is the classic tell that an ad is wearing out its audience. A script can watch both metrics per-ad over a rolling window and flag anything crossing your threshold — so you find out from a message instead of noticing three days late that a top performer quietly died.
3. Naming-convention audits
If your team has a naming standard for campaigns, ad sets, and creatives (and it should), a script can scan the account and flag anything that doesn't match the pattern — catching drift before it turns your reporting into a mess of inconsistent labels nobody can filter on.
4. Bulk UTM checks
Pull every active ad's destination URL and verify the UTM parameters are present, correctly formatted, and pointing at the right campaign — a five-minute agent job that replaces an hour of manually clicking through ads.
5. Auto-pause rules — drafted, not executed
Have the agent write the logic for "pause anything with a CPA over $X after $Y spend" as a script that flags candidates rather than one that pulls the trigger unattended. More on why in the next section.
Example prompts that work well in the terminal:
Here's my Meta system user token and ad account ID: [token] /
[act_XXXXXXXXX]. Build me a script that pulls yesterday's spend,
ROAS, and CTR for every active campaign and formats it as a
Slack message, ready to send via webhook.
Add creative fatigue detection: flag any ad where frequency is
above 3.5 and CTR has dropped more than 20% from its 7-day
average.
Now build (but do NOT auto-run) a script that lists every ad
set that would get paused under a CPA-over-$40-after-$100-spend
rule. I want to review the list before anything actually pauses.
This pairs naturally with the broader Claude for marketing analytics workflow and with using Claude for ad creative once your reporting layer is solid — the creative and the numbers should be talking to the same agent.
Want the whole ad-ops stack laid out?
Jonah's Guide to the Agentic Future is the free one-page PDF that walks through the API keys, the terminal setup, and how growth teams turn this into a full reporting-and-audit machine.
Get the Free Guide (PDF) →What NOT to automate blindly
Reporting, detection, and audits are read-only or advisory — low risk if the logic has a bug. Budget changes, bid changes, and campaign pauses are not. These move real money, and a subtle edge case in your automation logic (a timezone bug, a metric calculated on too small a sample, a threshold that made sense at $500/day and doesn't at $5,000/day) can compound fast before a human notices. The pattern that works:
- Let the agent draft the decision, not execute it. "Here's what I would pause and why" beats "I paused it" every time money is involved.
- Keep a human approval step — even a 30-second Slack thumbs-up before a script's write call fires — on anything that touches spend.
- Log everything the automation does or recommends, so if something does go sideways you can see exactly why the script made the call it made.
This is the same instinct behind why Claude Code's permission prompts exist in the first place — velocity is great until the action in question is irreversible or expensive, and ad spend is both.
The honest app-review note
For internal tooling reading and managing your own ad accounts through a properly scoped system user token, you generally don't need to go through Meta's full public App Review process — that's aimed at apps other businesses will connect their own ad accounts to. But Meta's exact requirements around permissions, token lifetimes, and review thresholds shift periodically, so treat this as a starting point and check Meta's current developer docs before you build anything you're relying on long-term, as of 2026.
Want a second set of eyes on your ad-ops automation?
Book 15 minutes and I'll walk through what to automate first, what to leave manual, and how FindClout structures its own reporting pipeline — no pitch.
Book a Call →Frequently Asked Questions
How do I connect Claude Code to Meta Ads?
Generate a system-user access token in Meta Business Settings (Business Settings → Users → System Users → Add → generate token with the permissions you need), then hand that token and your Ad Account ID to Claude Code in your terminal. Describe what you want built and the agent writes the script that calls the Meta Marketing API.
What is a system user token in Meta Business Manager?
A non-human identity inside Business Settings meant for API access rather than a personal login, with its own access token scoped to specific ad accounts and permissions. It's the correct way to give a script or agent programmatic access — never hand over a personal user's token for this.
Can AI automate Facebook ads reporting?
Yes. A script wired to the Meta Marketing API can pull spend, ROAS, CTR, and frequency across every active campaign and push a formatted digest to Slack or Telegram daily, with zero write access to the account — the safest and highest-value place to start.
Should I let AI automatically pause or change my ad budgets?
Not fully. Draft the pause/adjust logic as a script that flags what it would do and waits for a human approval step, rather than one that executes budget changes unattended — budget and bid changes have direct financial consequences.
Does the Meta Marketing API require app review?
For read-only access to your own ad accounts via a system user token, you generally don't need Meta's full public App Review process — that's mainly for apps other businesses connect their accounts to. Check Meta's current docs, as requirements shift, as of 2026.
What should I automate first with Meta Ads and Claude Code?
Start with a daily spend and ROAS digest — read-only, low-risk, immediately useful. Creative fatigue detection and naming-convention audits are natural next steps. Save anything that spends money for last, and keep a human approval step on it.
Jonah is the founder of FindClout, a curated creator distribution network that has generated 3.3B+ views for brands across sports, prediction markets, AI, and more. He builds most of FindClout's internal tooling himself, in a terminal, with zero formal coding background. Reach him at [email protected] or book a call.
findclout.com