← Back to blog
· #meta-ads · #claude-code · #business · 9 min read

How to Run Meta Ads with Claude Code: My Exact 2026 Workflow

I've run paid media for 15 years — campaigns for Bud Light, Temu, Maserati, and the NHL — and I've never had a media buyer as fast as a terminal window. Today I run my own Meta ads account with Claude Code sitting on top of the Marketing API: it pulls my numbers every morning, writes my copy variants, and flags what's actually dying versus what just had a bad Tuesday. Here's the exact workflow.

Why a Terminal Beats Ads Manager

Ads Manager is built for browsing, not deciding. You click through six screens to answer one question: "what did each active adset cost me per purchase over the last 7 days, and is that trending up or down?" Claude Code answers that in one sentence because it can hit Meta's Graph API directly, pull exactly the fields you care about, and do the math before you finish your coffee.

The bigger win is consistency. When I check numbers by hand, I check the numbers I feel like checking. When Claude Code checks them, it runs the same diagnostic every single day — spend, purchases, cost per purchase, CPM, CTR, frequency — and compares against the previous 7-day window. No mood, no bias, no "I'll look tomorrow."

The Setup (One Afternoon)

You need three things:

  1. A Meta access token. Create a system user in Business Manager, grant it your ad account with ads_read permission (add ads_management later if you want it making changes). Save the token to a local text file.
  2. Claude Code installed in your terminal ($20/month via Claude Pro gets you started).
  3. A CLAUDE.md file in your ads folder that tells it your account ID, where the token lives, your target cost per purchase, and your rules. This file is the difference between a generic assistant and a media buyer that knows your account.

My rules file includes things like: my breakeven cost per purchase, my naming convention, and hard lines like "never report paused adsets" and "never recommend changes to an adset under 7 days old." Claude Code reads it at the start of every session and behaves accordingly.

The Daily Insight Pull

Every morning I open the terminal and run one prompt:

"Pull last 7 days of insights for all ACTIVE adsets on my account. For each: spend, purchases, cost per purchase, CPM, CTR, frequency. Compare against the prior 7-day window. Rank by cost per purchase. Flag anything where frequency is over 3 or CPM jumped more than 30%."

Claude Code writes the Graph API call, executes it, and hands back a ranked table with a two-line diagnosis per adset. The frequency and CPM flags matter because they are the earliest signals of creative fatigue — your audience has seen the ad too many times and the auction is charging you more to force it in front of them. That flag tells me it's time to feed a new concept into a fresh adset, before the cost per purchase chart tells me the same thing a week later and $300 poorer.

One hard-earned tip: pull insights with an explicit time_range rather than presets like "last_7d". Attribution windows mean yesterday's numbers keep changing for up to 7 days — a purchase that happened today can get credited to a click from last Wednesday. Which brings me to the most important rule in this whole system.

The 7-Day Rule: Don't Kill Ads Early

The single most expensive mistake I see people make with Meta ads — and the mistake AI will happily accelerate if you let it — is killing ads on 2-3 days of data. I've watched adsets look dead for four days and then print purchases on days five through seven. I've also watched Monday's "disaster" turn into the week's best performer once delayed attribution caught up.

So my CLAUDE.md carries this rule verbatim: no pause recommendations on any adset with less than 7 full days and meaningful spend. Daily noise is not signal. Day-of-week swings are not signal. One bad Saturday is not signal. Seven days of spend with zero purchases at 2x your target cost — that's signal.

The corollary: when something IS working, leave it alone. Don't add new creative into a winning adset, don't fiddle with its budget mid-day, don't "optimize" it. New ideas go into new adsets. Winners run untouched.

Writing Copy Variants with Claude Code

This is where the leverage gets stupid. Every ad I run carries 2 primary texts and 2 headlines, and Claude Code drafts all of them against a locked formula. The prompt looks like this:

"Write 2 primary texts and 2 headlines for a Meta ad selling [product] to [specific avatar]. PT1 = personal story angle: pain point first, specific numbers, ends with the 30-day guarantee. PT2 = value-dump angle: what's inside, bulleted, ends with the guarantee. Headlines under 40 characters. No prices anywhere. Match this voice: [paste your best-performing ad]."

Pasting a proven winner as the voice reference is the trick. The model stops writing like a copywriting course and starts writing like your account's history. I keep every winning ad's copy in a text file for exactly this purpose.

Avatar + Angle: The Creative Thinking Layer

Meta's delivery system in 2026 essentially uses your creative as the targeting. That means every adset should be one avatar, one angle — a single coherent person and message, so the algorithm can figure out who to show it to. Mixing three concepts in one adset confuses the machine and you pay for the confusion.

Where Claude Code helps: brainstorming outside the obvious. When I ask it for audiences, I ban the boring answers first — "no job titles, no 'entrepreneurship', no 'digital marketing' interests" — because in my testing, obvious business audiences lose and passion and fandom audiences win. The unexpected interest with a plausible overlap to your buyer beats the literal interest almost every time. You can't be predictable in this game; make the AI be unpredictable with you.

If you're newer to the prospecting side of this, my AI lead generation guide covers how the same avatar thinking applies to cold outreach, and this piece on getting clients with AI shows the organic version.

The Weekly Deep Review

Once a week I run a longer session: pull 14 days of data, break down performance by placement and age, list every active ad by name with its individual numbers, and ask one question — "if this were a stranger's account, what would you tell them to stop doing?" That framing gets honest answers instead of polite ones. Agencies are running versions of this same review loop — here's how agencies use AI for client accounts — but you don't need an agency to have agency-grade reporting anymore.

Guardrails I never remove: Claude Code recommends, I approve. Every change gets stated back to me before it executes. Nothing goes live without an explicit yes. AI is the analyst; you're still the media buyer.

What This Replaces

A junior media buyer, a reporting tool subscription, and about 90 minutes a day of clicking around Ads Manager. What it doesn't replace is taste — knowing which creative concept deserves a test, which avatar is played out, which angle your market hasn't seen. That's the part I obsess over now, because it's the only part left that's hard.


FAQ

Do I need to know how to code to run Meta ads with Claude Code?

No. Claude Code writes and runs the API calls for you. You describe what you want in plain English — "pull my last 7 days of adset performance and rank by cost per purchase" — and it handles the Graph API syntax, authentication, and data formatting. Your job is judgment, not syntax.

How do I connect Claude Code to my Meta ads account?

You need a Meta access token with ads_read (and ads_management if you want it to make changes). Generate one through a system user in Business Manager, save it to a local file, and tell Claude Code where it lives. From there it can call the Marketing API directly.

Should I let AI make budget and pause decisions automatically?

Not at first. Run it in read-and-recommend mode: it pulls the data, diagnoses the account, proposes actions — you approve each one. Automate only after its recommendations have tracked with reality for weeks, and keep hard guardrails like the 7-day rule regardless.

The Full Meta Ads + Claude Code System Is Inside

The exact prompts, the CLAUDE.md rules file, the daily diagnostic, and the creative formulas I run on my own account. All inside the AI Playbook 2026 bundle.

GET THE AI PLAYBOOK 2026 →