Most ad accounts sit in Meta Business Manager generating data that nobody reads fast enough to act on. Claude can change that. When you wire your Meta Ads account into Claude — through a combination of Meta's API, a lightweight data export layer, and well-crafted prompts — you get a live analyst who reads your performance numbers and rewrites your copy on demand. This workflow covers the full setup: API credentials, data pull, and the prompts that turn raw metrics into revised campaigns.
What you need before you start
- A Meta Business Manager account with Admin or Advertiser access to the ad account you want to connect
- A Meta Developer App — free to create at developers.facebook.com
- A long-lived User Access Token or a System User Token (System User is better for ongoing use — it doesn't expire after 60 days)
- Claude.ai Pro or Team plan, or API access via Anthropic's API if you want to automate pulls programmatically
- Optionally: a Google Sheet or Airtable to stage data between Meta and Claude, or a tool like Make (Integromat) if you want scheduled pulls without writing code
Step 1 — Create your Meta Developer App and get a token
Go to developers.facebook.com and create a new app. Choose Business as the app type. Add the Marketing API product to the app. Under the app's settings, create a System User inside Business Manager (Settings → People → System Users), give it Standard or Admin access to your ad account, then generate a token for that System User. Select these permissions when generating: ads_read, ads_management, business_management. Copy the token and store it somewhere secure — a password manager or environment variable, not a sticky note.
System User tokens do not expire on a 60-day rolling basis the way personal User tokens do. If you use a personal token, you need to refresh it every 60 days or the connection breaks silently.
Step 2 — Pull campaign performance data from the Meta Ads API
You have two practical options here: a direct API call you run manually, or an automated pull via Make or Zapier. Start manual so you understand what data you're getting, then automate once the workflow is solid.
Here is the Graph API call to pull last 7 days of campaign-level performance for your account. Replace YOUR_AD_ACCOUNT_ID and YOUR_ACCESS_TOKEN with your actual values.
curl -G \
"https://graph.facebook.com/v19.0/act_YOUR_AD_ACCOUNT_ID/insights" \
--data-urlencode "fields=campaign_name,impressions,clicks,spend,ctr,cpm,cpp,actions,cost_per_action_type" \
--data-urlencode "date_preset=last_7_days" \
--data-urlencode "level=campaign" \
--data-urlencode "access_token=YOUR_ACCESS_TOKEN"The response is JSON. You can paste the raw JSON directly into Claude, or clean it up first by extracting the key columns into a simple table. Either works — Claude reads raw JSON fine.
If you want ad-set or ad-level data instead of campaign-level, change level=campaign to level=adset or level=ad and add ad_name or adset_name to the fields list.
Step 3 — Pull your active ad creative and copy
Performance data alone tells you what's broken. Creative data tells you what to fix. Pull your current ad copy with this call.
curl -G \
"https://graph.facebook.com/v19.0/act_YOUR_AD_ACCOUNT_ID/ads" \
--data-urlencode "fields=name,status,adcreatives{body,title,description,call_to_action_type,image_url,thumbnail_url}" \
--data-urlencode "effective_status=['ACTIVE']" \
--data-urlencode "access_token=YOUR_ACCESS_TOKEN"This returns the body copy, headline, description, and CTA for every active ad. Combine this output with the insights data from Step 2 before you pass anything to Claude.
Step 4 — Feed the data into Claude with a structured prompt
Open a Claude conversation and paste both data dumps together. Lead with context so Claude knows the account structure, then give it a specific instruction. Here is a working prompt template — fill in your actual data where indicated.
You are analyzing Meta ad performance for a coaching business. Here is last 7 days of campaign data from the Meta Ads API:
[PASTE YOUR INSIGHTS JSON OR TABLE HERE]
Here is the current ad creative for each active ad:
[PASTE YOUR ADS CREATIVE JSON HERE]
Do the following:
1. Identify the two lowest-performing ads by cost per result (CPR). State the campaign name, ad name, CPR, and CTR for each.
2. Identify the one best-performing ad by CPR. State why it's outperforming — look at the copy, CTA, and any patterns in the headline.
3. Rewrite the body copy and headline for the two weakest ads. Model the rewrites on what's working in the top performer. Keep the same offer and CTA type. Each rewrite should be ready to paste directly into Meta Ads Manager.
4. Flag any campaigns where CPM is above $25 and CTR is below 0.8% — these likely have audience or creative problems, not just copy problems.You will get a structured diagnosis and two ready-to-deploy rewrites in one response. This is the core of the workflow — run it weekly or after any significant spend event.
Step 5 — Automate the data pull so you're not doing this manually
Manual pulls work but require discipline. Automate with Make (formerly Integromat) to push performance data into a Google Sheet on a schedule, then feed that sheet into Claude.
- In Make, create a new scenario and add an HTTP module — set it to make a GET request to the Graph API URL from Step 2 on a weekly trigger (Sunday night works well so you have fresh data Monday morning)
- Add a Google Sheets module after the HTTP call — map the JSON fields (campaign_name, spend, ctr, cpm, cost_per_action_type) into columns
- When you're ready to run your Claude analysis, open the sheet, copy the last 7 rows, and paste them into your Claude prompt above
- If you have Claude API access, you can skip the sheet and pipe the Make HTTP response directly into an Anthropic API call using Make's HTTP module — the response body becomes the prompt context
If you use the Anthropic API inside Make, be specific in your system prompt about output format. Ask for JSON output so Make can parse it and write structured results back to a sheet or trigger a Slack message with the summary.
Step 6 — Use Claude to write new test variants, not just fix weak ads
Once the diagnostic loop is running, extend it to creative generation. After Claude identifies your top performer, use this prompt to spin up structured test variants.
Here is my top-performing ad from the last 30 days:
Headline: [PASTE HEADLINE]
Body: [PASTE BODY COPY]
CTA: [PASTE CTA]
CPR: [PASTE COST PER RESULT]
CTR: [PASTE CTR]
Generate 3 new ad variants to test against this control. Each variant should:
- Test a different angle: one leads with the problem, one leads with the outcome, one leads with a specific proof point or mechanism
- Match the same approximate length
- Use the same CTA type
- Be formatted as: Headline / Body / CTA on separate labeled lines
Also explain in one sentence what hypothesis each variant is testing.Step 7 — Push rewrites back into Meta Ads Manager
Claude gives you copy — you still move it into Meta. For now, duplicate your existing underperforming ad in Ads Manager, swap the headline and body copy with Claude's rewrite, and keep everything else identical (audience, budget, placement). Label the ad clearly so you can track which version is the Claude rewrite when you pull data next week. If you have API write access and want to automate this, use the POST endpoint for ad creative creation — but for most operators, manual copy-paste into a duplicate ad is fast enough and easier to audit.
Maintaining the loop
This workflow compounds when you run it consistently. The tell that it's working: your average CPR drops over 6-8 weeks as you systematically cut weak copy and scale what Claude's analysis identifies as the structural drivers of performance. You're not guessing at creative anymore — you're running a weekly diagnostic and shipping rewrites based on data you can actually see.