Create AI-generated meta ad campaigns from product URLs with OpenAI & Firecrawl
Needs changesWhat this workflow does
This AI workflow has 35 nodes and runs when someone submits an n8n form. Along the way it connects OpenAI, OpenAI Chat Model and Firecrawl (community).
How it runs
Trigger: When someone submits an n8n form.
- Scrape a url and get its content (Firecrawl): uses Firecrawl
- OpenAI extraction with JSON Schema (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model; output parser: Structured Output Parser
- Analyze Product (OpenAI): uses OpenAI
- Merge: merges the data from its input branches
- Creative Brief (OpenAI): uses OpenAI
- Generate Ad Camp (AI Agent): runs an AI agent, with model: GPT-4 Model; output parser: Output Parser
- Split (Split Out): splits a list into separate items
- Platform Adapter (Code): runs custom JavaScript code
- Batch (Loop Over Items (Split in Batches)): loops over the items in batches
- Configuration Meta Ads (Edit Fields (Set)): sets or maps fields
…plus 20 more steps. See the full node list below.
Services it uses
Other Firecrawl + OpenAI templates (50)
Uses Firecrawl. New users get 10% off with our link.
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- Function (legacy) in Run Once: replace with Code node, mode 'Run Once for All Items'.
- AI Agent v1 (old agent modes) in Generate Ad Camp (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
Published 2025 — 19% of 2025 templates need changes for 3.0. See how template age affects 3.0 readiness →
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
| Removed in 3.0 | Replace 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. |
Nodes used (17)
- Split Out
n8n-nodes-base.splitOut - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Wait
n8n-nodes-base.wait - n8n Form Trigger
n8n-nodes-base.formTrigger - HTTP Request
n8n-nodes-base.httpRequest - Convert to File
n8n-nodes-base.convertToFile - OpenAI
@n8n/n8n-nodes-langchain.openAi - Firecrawl
@mendable/n8n-nodes-firecrawl.firecrawl - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Merge
n8n-nodes-base.merge - If
n8n-nodes-base.if - Function
n8n-nodes-base.function - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent
From the author
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,…