AI-Powered Meta Ads Builder (Facebook & Instagram)
Turns a product URL into paused Meta ads by scraping product data, generating creatives with OpenAI, and building campaign structure via the Graph API.
What this file does
Turns a product URL into paused Meta ads by scraping product data, generating creatives with OpenAI, and building campaign structure via the Graph API.
When to use it
- Agencies needing repeatable ad creation for multiple clients
- Performance marketers who want to automate campaign setup
- Founders testing ad variations without manual creative work
- Teams that must review ads before publishing
Assumes this stack
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” (
your_ad_account_id, etc.)
Requirements
- OpenAI credential (Chat + Images)
- Facebook Graph API credential (with
ads_managementpermissions) - Firecrawl credential (API key)
- Your Ad Account ID, Facebook Page ID, Pixel ID, Destination URL
Quick setup (5 steps)
-
Import the JSON in n8n.
-
Create Credentials for OpenAI, Facebook Graph API, Firecrawl.
-
Open “Configuration Meta Ads” node and set:
ad_account_id,facebook_page_id,pixel_id,website_link
-
Open the Form Trigger URL and submit a real product URL.
-
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 ad_account_id, facebook_page_id, pixel_id, website_link.
> * 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 PAUSED. > * Review copy, claims, and targeting for compliance. > * Enable after quality checks.
Security & compliance
- Secrets live in n8n Credentials or environment variables—never in nodes.
- Follow Meta ad policies (no restricted claims, no before/after, etc.).
- Product facts only; unknown fields remain
null/empty arrays.
Performance tips
- Start with auto placements; test Feed/Reels later if needed.
- Keep primary text 125–200 chars; headline short (testimonial-style in quotes).
- Use the best product image as reference.
- Scale carefully: tune Batch and Wait for your throughput.
FAQ
Does it publish automatically? No. Ads are created PAUSED for review.
Instagram-only campaigns? Yes. Set placements to IG (or keep auto and let Meta optimize).
Thin product pages?
Extractor returns null for missing fields; the brief adapts without inventing data.
Bring my own audiences? Swap the generated audience block for your saved audiences or static lists.
Change image model/size? Yes—edit the OpenAI Images node (model/size). Keep 1:1 for FB/IG.
What's inside
1 form trigger, 1 Firecrawl scrape, 2 OpenAI nodes, 1 creative brief builder, 1 campaign JSON generator, 1 Meta Graph API sequence, 6 utility nodes
Change this for your project
- Replace
your_ad_account_idin the Configuration Meta Ads node - Replace
your_facebook_page_idin the Configuration Meta Ads node - Replace
your_pixel_idin the Configuration Meta Ads node - Replace
your_website_linkin the Configuration Meta Ads node
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Using a form trigger as a client-friendly intake before automation
- Generating images with vision-style cues from product data for brand consistency
- Creating all ad assets in PAUSED status to enforce a review gate
Related Documents
SVI 2.0
Documents the SVI LoRA family for WanVideo I2V, covering version history, usage patterns, known limitations, and community workflows.
TVM: An Automated End-to-End Optimizing Compiler for Deep Learning
Describes TVM, a compiler that optimizes deep learning models for diverse hardware back-ends using graph-level and operator-level transformations.
Content Workflow
Defines a 6-stage content production pipeline with automated quality scoring and self-healing gates that enforce an 8.0 minimum score across four dimensions.
LLM Instructions for PlexMix
Defines a step-by-step release process for a Python CLI tool, including version bumps, tagging, GitHub releases, and CI checks.