← All resources

resource / ad variations with claude code

100 Facebook ad variations with Claude Code. The five steps, one by one.

The method from the video, with a ready prompt for every step and the traps worth knowing before you spend a euro.

Before you start

The video talks about launching 100 Facebook ads in under 30 minutes with Claude Code. That figure is the video's: it has not been measured here, so treat it as a promise of method and not a guaranteed result. What is real is the sequence: you build a generator, create variations, research your audience, write the copy and upload everything as drafts.

What you need at hand:

  • Claude Code, Anthropic's tool for working with your files from your computer. It needs a paid Claude plan or an API key; see prices at claude.com/pricing.
  • A Meta ad account and a developer app with permission to manage ads (ads_management). Docs at developers.facebook.com.
  • A Perplexity API key for the research step. It is pay-per-use: see the pricing page.
  • A Railway account for the tracking dashboard. It has a trial credit and is paid afterwards: see railway.com/pricing.

Golden rule: everything is uploaded paused. No ad spends a single euro until you switch it on yourself.

The five steps

  1. Step 1. Build an ad generator with React. It turns raw data (your sheet of products, offers and reviews) into ads in the format Facebook asks for. Ask for it like this:
    I want an ad generator for Facebook and Instagram built with React.
    Input: a CSV file with these columns: product, main benefit, audience, price or offer, proof (a review or a real figure), link.
    Output: for each row, an ad with primary text, headline, description, call-to-action button and link, in Facebook's format, plus a preview of each one.
    Rules: do not invent any data that is not in the sheet. Save all the copy in an exportable file.
    Before coding, show me a short plan and wait for my go-ahead.
  2. Step 2. Generate variations to find the ad that converts. The key is to change one thing at a time, so you know what worked. With 5 angles, 5 hooks and 4 calls to action you get 5 × 5 × 4 = 100 variations.
    Take this base ad: [PASTE YOUR AD].
    Generate variations changing only one thing at a time:
    - the angle (saving time, fear of missing out, prestige, curiosity, social proof);
    - the hook in the first line;
    - the call to action.
    Label each variation with the angle, hook and call it uses, so I can compare later.
    No repeated phrases and no promises my product does not keep.
  3. Step 3. Research your audience with the Perplexity API. Instead of guessing, look for the problems and outcomes your customer describes on Reddit and YouTube. The Perplexity API can limit a search to specific domains with the search_domain_filter parameter (docs).
    Use the Perplexity API (Sonar model) to research what [MY AUDIENCE: for example, restaurant owners] say about [PROBLEM] on Reddit and YouTube. Limit the search to reddit.com and youtube.com with the domain filter.
    Return:
    1. the 10 problems that come up most;
    2. the phrases they use, with a link to each source;
    3. the outcome they say they want.
    If you cannot find a source, say so. Do not invent anything.
    The API key goes in an environment variable, never written in the code.
  4. Step 4. Feed those insights to your agent to write headlines and copy. That way the words come from your audience, not from your head.
    Using the research above [PASTE THE RESULT] and my base ad, write headlines and primary texts with the words my audience uses.
    One short headline and one text per variation, with its angle and hook label.
    No promises I cannot keep, no invented data, and nothing that breaks Meta's advertising policies (for example claims about health, guaranteed money or personal attributes of the viewer).
    Return it as a CSV ready for the step 1 generator.
  5. Step 5. Upload the variations as drafts and watch the winners. The Facebook ads API (the Marketing API) creates the ads; Railway hosts a dashboard that tracks them. First, the upload:
    Upload the variations to my Meta ad account with the Marketing API.
    Rules you cannot break:
    - campaign, ad set and ads with status PAUSED, never ACTIVE;
    - maximum ad set budget: [AMOUNT]; do not exceed it;
    - send them in small batches and retry only the ones that fail;
    - keep a log with the ID of each ad.
    When done, tell me how many uploaded, how many failed and why. Do not activate anything.

    Then, the tracking dashboard:

    Build a simple web dashboard that reads my Meta ad account (read-only) and shows per variation: spend, clicks, cost per click and results. Mark the 5 best in green and the 5 worst in red. Prepare it to deploy on Railway and tell me which environment variables it needs. Ask me to confirm before deploying.

From there, you just polish

The agent handles the research, the formatting and the upload. Your part is the one you cannot delegate:

  • Read 10 random ads before turning anything on. If a sentence is not one you would say, delete that variation and ask for another.
  • Turn on only a few at first and read the results calmly: with little data it is easy to pick the wrong winner.
  • Write down, with the date, which angle and hook won. It is what you will use in the next campaign.

Four honest warnings

  • A hundred variations are not a hundred ideas. If the product or the offer does not interest people, a hundred versions of the same ad will not fix it.
  • Meta reviews ads and may reject the ones that break its policies. An uploaded ad is not an approved ad.
  • API permissions take paperwork. You may need to verify your business and request advanced access with Meta; the official docs say what is required in each case.
  • The spend is yours. Set a budget cap on the account and do not give the agent permission to activate ads. The 5 laws of my AI team explain how to write that down.

Want us to set it up for your case?

If you'd like to see whether this makes sense for your company's ads, write to me.

Links go to the official documentation and are not affiliate links. Prices change: check them on each page.