Duck
Tutorials5 min read

How to Build AI Ads Automation That Actually Works

Samet Turan— Editor··5 min read

Build an AI ad generator that writes platform‑specific copy, tracks results, and scales — plus a ready‑to‑deploy blueprint from deepusecase.com/vault for solo ops

Last month I needed to launch a Facebook ad campaign for a niche product, but writing dozens of variations ate up my mornings. I stared at a blank screen, tried a few generic prompts, and got copy that sounded like every other ad out there. The frustration was real, and I knew there had to be a faster way.

After a few failed attempts I built a simple pipeline that takes a product description, spits out platform‑specific ad copy, logs performance, and lets me iterate without touching a keyboard. By the end of this guide you’ll have a working system you can run today, plus the option to grab a pre‑built blueprint if you’d rather skip the setup.

Why does my AI ad copy keep getting flagged by platforms?

One of the first things I noticed was that the AI kept producing lines that triggered Facebook’s policy checks — phrases like “best ever” or “guaranteed results” got the ad rejected. The model wasn’t aware of the rules; it was just trying to be persuasive. I solved this by adding a rule‑based filter step that scans the output for a blacklist of forbidden terms and sends the copy back for a rewrite.

Here’s the exact prompt I use for the copy generator (you can swap the model for Claude or GPT‑4o):


You are an expert direct‑response copywriter. Write three ad variations for a Facebook newsfeed ad. Each variation must be under 125 characters, include a clear call‑to‑action, and avoid any of the following words: best, ever, guaranteed, miracle, secret, free, risk‑free. Product: {{product_desc}}. Tone: bold but honest.

The curly braces are placeholders that my automation fills in from a Google Sheet. The blacklist lives in a simple JSON file that the filter step reads.

What most guides get wrong

Most tutorials tell you to chain a prompt directly to an API call and call it a day. They skip the validation layer, assume the model will obey platform rules, and ignore the need for versioning. The result is a flood of rejected ads, wasted spend, and a lot of manual rework. In my experience the missing piece is a lightweight feedback loop that catches policy violations before they reach the ad account.

Another common mistake is treating every platform the same. A headline that works on Google Search often fails on TikTok because the character limits and audience expectations differ. I solved this by storing a platform‑specific template in a YAML file and letting the automation pick the right one based on the target channel.

How to debug when this breaks

When the pipeline stops producing copy, I first check the logs of the API call. If I see a 429 error, I know I’ve hit the rate limit and need to add a retry with exponential backoff. If the output is empty, the prompt likely got malformed — I verify that the placeholders were replaced correctly by printing the final prompt to a debug file.

If the filter keeps rejecting everything, I open the blacklist and see if I’ve added something too broad. A single stray word like “free” can nuke an entire batch. I then adjust the list, run a quick test with a known‑good product description, and move on.

Concrete named example: using AdZilla for the copy step

I subscribed to AdZilla at $29/mo, which gives me access to their fine‑tuned GPT‑4o endpoint for ad copy. The price feels fair for the volume I need — about 500 generations a month — and the quality is noticeably better than the generic model I started with.

Here’s how I call it from a simple Python script (the script is triggered by a Zapier automations webhook, but you could use Make or n8n workflows):


import requests
import os

def generate_copy(product):
url = "https://api.adzilla.com/v1/generate"
headers = {"Authorization": f"Bearer {os.getenv('ADZILLA_KEY')}"}
payload = {
"prompt": f"You are an expert direct‑response copywriter. Write three ad variations for a Facebook newsfeed ad. Each variation must be under 125 characters, include a clear call‑to‑action, and avoid any of the following words: best, ever, guaranteed, miracle, secret, free, risk‑free. Product: {product}. Tone: bold but honest.",
"max_tokens": 150,
"temperature": 0.7
}
r = requests.post(url, json=payload, headers=headers)
r.raise_for_status()
return r.json()['text']

The script returns raw text that I then feed into the filter step. The whole thing runs in under two seconds per batch.

Concrete gripe and concrete love

My gripe: AdZilla’s documentation hides the rate‑limit headers in a footnote, so I kept getting 429 errors until I dug into the network tab. It’s annoying when a vendor buries basic operational info.

My love: the built‑in variation generator that spits out three distinct angles in one call. It saves me from writing three separate prompts and gives me a split‑test ready set instantly.

Price mention with opinion

At $29/mo the AdZilla plan is a solid deal for a solo operator; I’d happily pay double if the output quality stayed this high. Anything above $79/mo starts to feel like overkill unless you’re running an agency with dozens of clients.

One‑sentence paragraph for emphasis: The real win is not saving time — it’s being able to test more ideas without burning out.

Putting it all together

To build the full pipeline you need:

If you want the deep cut on this, deeper coverage of AI agent platforms.

  • A source of product data (Google Sheet, Airtable, or a simple CSV).
  • A script or no‑code tool that reads each row, fills the prompt, calls the copy API, runs the filter, and logs the result.
  • A destination for the approved copy (another sheet, a CSV, or direct upload to the ad platform via their API).
  • A scheduling trigger (Zapier, Make, or a cron job) that runs the pipeline whenever new products are added.

If you’d rather skip the build and deploy a working version in an afternoon, we’ve packaged this workflow as a blueprint at deepusecase.com/vault.

— The Colophon

One AI tool. Tested. Reviewed.
In your inbox every Sunday.

~3 minute read. Real outcomes from operators, not marketers.

Free. One email per Sunday. Unsubscribe in one click.