Templates / Create AI-generated meta ad campaigns from product URLs with OpenAI & Firecrawl

Create AI-generated meta ad campaigns from product URLs with OpenAI & Firecrawl

Needs changes

by Abdellah Homrani ✓ · 246 views · created 2025-09-17 · Social Media, Multimodal AI

Needs changes. This template uses 2 thing(s) that n8n 3.0 removes: Function (legacy), AI Agent v1 (old agent modes). 2 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
Function (legacy)
Run Once
Code node, mode 'Run Once for All Items'
AI Agent v1 (old agent modes)
Generate Ad Camp (v1.9)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Community nodes

These come from third-party npm packages. In n8n 3.0 unverified community packages are off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).

Nodes used (17)

OpenAIOpenAI Chat ModelStructured Output ParserBasic LLM ChainAI Agent

What it does

AI-Powered Meta Ads Builder (Facebook & Instagram) Turn any product page into ready-to-run Meta ads—fast, consistent, and client-friendly. Category: Marketing Automation / Ads / AI Price: \$25 (one-time) Integrations: Meta (Facebook & Instagram), OpenAI, Firecrawl, n8n Output: Campaign → Ad Sets → Creatives → 1:1 Images (created in PAUSED status) --- Description This template takes a product URL and produces publish-ready Meta ads without the busywork. Your client fills a clean form; the workflow scrapes product data, writes a creative brief, generates ad-set variations, produces 1:1 images with OpenAI, and builds Campaign → Ad Set(s) → Ad(s) in PAUSED for review. Perfect for: agencies, performance marketers, founders who need repeatable creative and less manual setup. Highlights Form-based intake (client-friendly) Schema-clean product extraction (no made-up facts) Vision cues for on-brand visuals Platform-safe 1:1 images and copy lengths Auto placements by default (or customize) Creates assets in PAUSED so you stay in control --- What’s inside Form Trigger: “AI Ad Creation” Firecrawl: scrape product content + images OpenAI (LLM + Vision): clean JSON + aesthetic/emotion cues Creative Brief Builder: merges product facts with tone/goals Campaign JSON Generator: campaign + ad\sets as strict schema OpenAI Images: 1:1 creatives (1024×1024 by default) Meta Graph API: upload assets, create creatives, campaign, ad sets, and ads (PAUSED) Split / Batch / Wait / If / Set / Merge: stable, scalable processing --- How it works Form → Firecrawl scrape → Product JSON (LLM) → Vision style cues → Creative brief → Campaign JSON (LLM) → Split into ad sets → For each ad set: → Generate image → Upload to Meta → Create Creative → Create Campaign → Create Ad Set → Create Ad (PAUSED) --- What changed in this version 🔐 No hardcoded API keys — all auth uses n8n Credentials 📌 PinData removed — the template ships clean (no sample data) 🧩 Clean placeholders for IDs/links in “Configuration Meta Ads” (youradaccountid, etc.) --- Requirements OpenAI credential (Chat + Images) Facebook Graph API credential (with adsmanagement permissions) Firecrawl credential (API key) Your Ad Account ID, Facebook Page ID, Pixel ID, Destination URL --- Quick setup (5 steps) 1. Import the JSON in n8n. 2. Create Credentials for OpenAI, Facebook Graph API, Firecrawl. 3. Open “Configuration Meta Ads” node and set: adaccountid, facebookpageid, pixelid, websitelink 4. Open the Form Trigger URL and submit a real product URL. 5. In Ads Manager, review campaign/ad sets/ads (they’re PAUSED), then enable. --- Inputs (Form) Product URL (required) Campaign Type (Launch, Seasonal, Awareness, Retargeting, LTO) Target Platform (Facebook, Instagram) Number Of Variation (integer) Target Audience Key Message / Offer Emotional Tone (multi-select: Joy, Trust, Fear, Surprise, Sadness, Disgust, Anger) --- Outputs Creative Brief (concise, platform-aware) Campaign JSON with: Ad sets (audience, placements, schedule/budget placeholders) Creative (primary\text, headline, description, CTA, UTM defaults, reference image) AdConcept (imageName, prompt, emotional hook, 1:1 safe zones) Meta assets created: uploads → creatives → campaign → ad set(s) → ad(s) (PAUSED) --- Sticky notes (mandatory) > Credentials > > Use OpenAI, Facebook Graph API, and Firecrawl credentials in n8n. > ⚠️ No hardcoded keys anywhere (HTTP node or otherwise). > Form Testing > > Use a real product URL with at least one image. > Start with 1–2 variations; scale after review. > If scraping fails, verify Firecrawl key and the site’s policies. > Meta Upload > > Set adaccountid, facebookpageid, pixelid, websitelink. > If uploads fail, check account permissions and app scopes. > OpenAI Images > > Default: 1:1, 1024×1024. > You can change size in the Images node (keep FB/IG safe zones). > Prompts should avoid policy-sensitive claims. > Safety & Review > > Everything is created PAU

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.