Meta Ads Manager + OpenAI: campaigns from any URL
Building Meta campaigns from scratch is tedious. You copy product details from a page, rewrite them into ad copy, hunt for images, then repeat the same setup clicks in Ads Manager until you’re not even sure what you named the last ad set.
This is the kind of Meta ads automation that performance marketers feel immediately. Agency owners run into it when clients want “three angles by tomorrow.” And founders doing their own ads get stuck in setup instead of testing.
This workflow takes one product URL and produces Campaign → Ad Sets → Ads with 1:1 creatives in PAUSED status, ready for review. You’ll learn what it does, what you need, and how to run it reliably in n8n.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Meta Ads Manager + OpenAI: campaigns from any URL
flowchart LR
subgraph sg0["AI Ad Form Submission Flow"]
direction LR
n0@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split", pos: "b", h: 48 }
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Platform Adapter"]
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Batch", pos: "b", h: 48 }
n3@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>AI Ad Form Submission"]
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Open AI Generate Image"]
n6@{ icon: "mdi:cog", form: "rounded", label: "B64 String to File", pos: "b", h: 48 }
n7@{ icon: "mdi:robot", form: "rounded", label: "Creative Brief", pos: "b", h: 48 }
n8@{ icon: "mdi:location-exit", form: "rounded", label: "Scrape a url and get its con..", pos: "b", h: 48 }
n9@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model2", pos: "b", h: 48 }
n10@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser1", pos: "b", h: 48 }
n11@{ icon: "mdi:robot", form: "rounded", label: "OpenAI extraction with JSON ..", pos: "b", h: 48 }
n12@{ icon: "mdi:robot", form: "rounded", label: "Analyze Product1", pos: "b", h: 48 }
n13["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge1"]
n14["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Upload Video to FB"]
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Create Video Creative"]
n16@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Is it a Video?", pos: "b", h: 48 }
n17["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Upload Image to FB"]
n18["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Create Image Creative"]
n19["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge Creatives"]
n20["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Create Campaign"]
n21@{ icon: "mdi:code-braces", form: "rounded", label: "Run Once", pos: "b", h: 48 }
n22["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Create Ad Set"]
n23["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Create Ad"]
n24@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Video ID", pos: "b", h: 48 }
n25@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Image Hash", pos: "b", h: 48 }
n26@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Image Packet", pos: "b", h: 48 }
n27@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Video Packet", pos: "b", h: 48 }
n28@{ icon: "mdi:swap-vertical", form: "rounded", label: "Save Adset Id", pos: "b", h: 48 }
n29["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge2"]
n30@{ icon: "mdi:swap-vertical", form: "rounded", label: "Configuration Meta Ads", pos: "b", h: 48 }
n31@{ icon: "mdi:brain", form: "rounded", label: "GPT-4 Model1", pos: "b", h: 48 }
n32@{ icon: "mdi:robot", form: "rounded", label: "Output Parser1", pos: "b", h: 48 }
n33@{ icon: "mdi:robot", form: "rounded", label: "Generate Ad Camp", pos: "b", h: 48 }
n34@{ icon: "mdi:swap-vertical", form: "rounded", label: "Edit Fields", pos: "b", h: 48 }
n3 --> n5
n2 --> n30
n2 --> n3
n0 --> n1
n13 --> n7
n29 --> n23
n21 --> n20
n34 --> n2
n31 -.-> n33
n31 -.-> n32
n24 --> n15
n22 --> n28
n28 --> n29
n7 --> n33
n16 --> n14
n16 --> n17
n32 -.-> n33
n25 --> n18
n20 --> n22
n19 --> n29
n19 --> n21
n12 --> n13
n33 --> n0
n1 --> n2
n26 --> n19
n27 --> n19
n6 --> n34
n9 -.-> n11
n9 -.-> n10
n17 --> n25
n14 --> n24
n4 --> n8
n18 --> n26
n15 --> n27
n30 --> n16
n5 --> n6
n10 -.-> n11
n8 --> n11
n11 --> n12
n11 --> n13
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n4 trigger
class n7,n10,n11,n12,n32,n33 ai
class n9,n31 aiModel
class n16 decision
class n5,n14,n15,n17,n18,n20,n22,n23 api
class n1,n21 code
classDef customIcon fill:none,stroke:none
class n1,n4,n5,n13,n14,n15,n17,n18,n19,n20,n22,n23,n29 customIcon
Why This Matters: Turning a Product Page Into Ads Is Still Manual
Most teams don’t struggle with “making an ad.” They struggle with making ten good ads, consistently, without inventing product details or missing a required setting in Meta Ads Manager. You start with a product URL, then it turns into a messy chain of copy-paste: features into a doc, doc into prompts, prompts into captions, captions into Ads Manager, then images resized and re-uploaded. One small mistake (wrong destination URL, wrong page, wrong format) and you’re debugging instead of launching.
The friction compounds. Especially when you’re trying to ship variations quickly and keep everything client-friendly.
- You lose about 1–2 hours per campaign just moving info between tools and re-checking details.
- Manual rewriting encourages “creative guessing,” which can lead to claims the product page never made.
- Image handling slows everything down, because you still need platform-safe 1:1 assets and consistent naming.
- When variations are tracked in someone’s head (or DMs), review cycles drag on and approvals get fuzzy.
What You’ll Build: URL to Paused Meta Campaigns With AI Creatives
This workflow starts with a simple form submission: a product URL plus a few campaign inputs like offer, audience notes, emotional tone, and how many variations you want. n8n then scrapes the product page using Firecrawl, extracts product facts into a clean schema (so it doesn’t make things up), and has OpenAI turn those facts into a creative brief and campaign plan. From there, it generates 1:1 images (1024×1024 by default), uploads the assets through the Meta Graph API, and creates your Campaign → Ad Set(s) → Ad(s). Everything is created in PAUSED status, which means you stay in control and can review compliance, copy, and targeting before you enable anything.
The workflow begins when you submit the “AI Ad Creation” form. Then it moves through scrape → structured product JSON → creative brief → campaign JSON → batch through ad sets and variations. Finally, Meta assets and campaigns appear inside Ads Manager, already assembled and waiting for your green light.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you build ads for 5 products a week and you normally make 2 variations per product. Manually, it’s easy to spend about 60 minutes per product collecting details, writing copy, resizing images, and clicking through campaign setup, which is roughly 5 hours a week. With this workflow, you submit the form in about 5 minutes, then wait around 20–30 minutes for scraping, AI generation, image creation, and Meta uploads. You still review everything, but you’re reviewing drafts, not building from zero.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Meta Ads (Facebook/Instagram) for creating campaigns, ad sets, and ads
- OpenAI to generate briefs, copy, and images
- Firecrawl API key (get it from your Firecrawl dashboard)
Skill level: Intermediate. You’ll connect credentials, set a few Meta IDs (ad account, page, pixel), and test with a real product URL.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
Form submission kicks everything off. You (or a client) submit a product URL plus campaign type, target platform, number of variations, and a few creative inputs like tone and offer.
The workflow scrapes and cleans the product data. Firecrawl fetches page content and images, then OpenAI converts it into structured product JSON, keeping unknown fields empty instead of guessing.
AI generates a brief, ad sets, and creatives. The workflow produces a creative brief, then a strict campaign schema, splits variations into batches, and generates 1:1 images (plus copy in platform-safe lengths).
Meta assets are uploaded and assembled as PAUSED ads. Using the Meta Graph API, it uploads images (and handles video branches if needed), creates creatives, then creates campaign → ad set(s) → ads. Everything shows up in Ads Manager ready for review.
You can easily modify placements and budgeting defaults to match your process. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Form Trigger
Set up the intake form that starts the automation and passes the initial payload into the creative generation pipeline.
- Add the Ad Form Intake node as the trigger for the workflow.
- Open Ad Form Intake and configure the form fields required for product URL, brand details, and creative preferences.
- Save the form and copy the generated public URL to share with your team.
- Connect Ad Form Intake to Fetch Web Content.
Step 2: Connect Web Content and Schema Extraction
Pull web content from the submitted URL and extract a structured schema to drive AI analysis.
- Configure Fetch Web Content to crawl the submitted page and return raw content.
- Connect Fetch Web Content to Schema Extraction.
- Attach Chat Model Engine as the language model for Schema Extraction.
- Attach Structured Parser A as the output parser for Schema Extraction.
Schema Extraction outputs to both Product Analysis and Combine Stream A in parallel.
Credential Required: Connect your OpenAI credentials in Chat Model Engine. Structured Parser A is a sub-node, so credentials should be added to Chat Model Engine, not the parser.
Step 3: Generate Creative Insights and Campaign Plan
Summarize the product context and generate a campaign plan using AI orchestration.
- Configure Product Analysis to analyze the extracted schema and return insights.
- Merge the parallel outputs in Combine Stream A and send them to Creative Summary.
- Connect Creative Summary to Generate Campaign to create the campaign plan.
- Attach GPT-4 Model Core as the language model for Generate Campaign.
- Attach Output Parser Core as the output parser for Generate Campaign.
Credential Required: Connect your OpenAI credentials in GPT-4 Model Core. Output Parser Core is a sub-node, so credentials should be added to GPT-4 Model Core, not the parser.
Step 4: Split, Convert, and Batch the Campaign Records
Break the campaign plan into ad records, convert platform formats, and process in batches.
- Connect Generate Campaign to Divide Records to split the response into individual items.
- Pass outputs through Platform Converter to normalize ad fields for the target platform.
- Send each record to Batch Processor for batching logic.
- Route Batch Processor to Meta Ads Config for configuration, and to Pause Execution for timing control.
Step 5: Configure Creative Asset Generation and Uploads
Create AI images, check format, and upload creative assets for image and video paths.
- From Pause Execution, send the batch to Generate AI Image and then to Decode Image File.
- Map the decoded file in Map Fields before returning to Batch Processor for continued flow.
- Route from Meta Ads Config to Video Format Check to determine whether to use video or image assets.
- For video: connect Video Format Check to Upload Video Asset → Assign Video ID → Build Video Creative → Prepare Video Payload.
- For image: connect Video Format Check to Upload Image Asset → Assign Image Hash → Build Image Creative → Prepare Image Payload.
⚠️ Common Pitfall: Ensure Generate AI Image, Upload Video Asset, Upload Image Asset, Build Video Creative, Build Image Creative, Create Campaign Plan, Create Ad Group, and Publish Ad have correct API endpoints and authorization headers for your ad platform.
Step 6: Merge Creatives and Build Campaign Structure
Combine prepared creatives and create the campaign, ad group, and publishing steps.
- Merge Prepare Video Payload and Prepare Image Payload into Combine Creatives.
- Combine Creatives outputs to both Combine Stream B and Single Run Gate in parallel.
- From Single Run Gate, send to Create Campaign Plan and then to Create Ad Group.
- Store identifiers in Store Adset ID and pass into Combine Stream B.
- Connect Combine Stream B to Publish Ad to launch the creative.
Step 7: Test and Activate Your Workflow
Validate the end-to-end flow and enable the workflow for production use.
- Click Execute Workflow and submit a test form in Ad Form Intake.
- Verify that Fetch Web Content and Schema Extraction return structured data without errors.
- Confirm that the creative assets pass through Upload Video Asset or Upload Image Asset, and that Publish Ad receives merged payloads.
- When the test completes successfully, toggle the workflow Active to enable live runs.
Troubleshooting Tips
- Meta (Facebook Graph API) credentials can expire or lack the right scopes. If things break, check your app permissions and the ad account access in Meta Business Settings first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Quick Answers
About 30 minutes if you already have your Meta and OpenAI credentials ready.
No. You’ll mainly connect credentials and paste a few IDs into the configuration node.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs, which are usually a few cents per run depending on how many variations and images you generate.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you should. You can adjust the “Ad Form Intake” fields to match your intake process, swap the campaign types you support, and change image size in the “Generate AI Image” node (just keep 1:1 if you want the safest FB/IG fit). If you have saved audiences, replace the generated audience block before the “Create Ad Group” request. You can also force Instagram-only or Facebook-only by changing the placement logic that happens after the “Platform Converter” step.
Usually it’s missing permissions. Make sure your Facebook Graph API credential includes ads_management and that the connected user has access to the ad account you set in “Meta Ads Config.” If the workflow used to work and suddenly doesn’t, regenerate the token, then update the n8n credential. Also check for rate limits if you increased variations and started uploading lots of assets in a short burst.
If you start with 1–2 variations per product, most teams can run several campaigns a day without issues, as long as you tune batching and waits.
Often, yes. This workflow needs branching, batching, and multi-step API calls to the Meta Graph API, and n8n is simply more comfortable there. It also keeps everything in one place: scrape, structure the data, generate images, then build the campaign objects. Zapier or Make can work, but you’ll likely end up with a long chain of fragile steps (and higher task costs) once you add variations. If you want, keep it simple: use this workflow to build drafts, then use another tool for notifications or approvals. Talk to an automation expert if you’re not sure which fits.
Once this is running, your “new campaign” process becomes a form link and a review step. That’s the point: fewer mistakes, faster launches, and a lot less mental clutter.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.