How do I connect Meta Ads to n8n?
Three steps. About 30 minutes including the Meta app review.
Step 1: Self-host n8n
bash
npx n8n
Or with Docker if you want it running on a server:
bash
docker run -it --rm --name n8n -p 5678:5678 \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
Open http://localhost:5678. The official repo is github.com/n8n-io/n8n.
Step 2: Get your Meta Marketing API token
Create an app at developers.facebook.com, add the Marketing API product, and grab a long-lived access token. The Meta Marketing API is free — no monthly fee.
Step 3: Add the Facebook Ads credential in n8n
In n8n: Credentials → New → Facebook Graph API. Paste your token. Done.
Step 4: Build your first workflow — auto-pause underperforming ads
This is the workflow that saved a B2B manufacturer 5 hours a week and lifted their ROI 15%.
[Cron: every 6 hours]
↓
[Facebook Ads node: Get insights for last 24h]
↓
[IF: ROAS < 1.5 OR CTR < 0.5%]
↓
[Facebook Ads node: Pause ad]
↓
[Slack: Notify marketing team]
Step 5: Add Claude for ad copy generation
Drop a Claude node between your inventory source and the Meta Ads node. Feed product data, get back ready-to-launch ad copy:
json
{
"system": "You write Meta Ads in 90 chars headline, 30 chars description.",
"user": "Product: {{ $json.product_name }}\nPrice: {{ $json.price }}\nUSP: {{ $json.usp }}"
}
Step 6: Wire performance reporting to Slack or Telegram
Daily at 9am: pull yesterday's spend, top 5 ads, worst 5 ads, post to a channel. Five nodes total.
What are Meta Ads AI Connectors in n8n?
n8n is a fair-code workflow automation platform with 400+ integrations including Facebook Ads, OpenAI, Anthropic Claude, Google Sheets, Slack, and Telegram. The README describes it as "the flexibility of code with the speed of no-code".
For Meta Ads specifically, the official Facebook Ads node lets you read insights, manage campaigns, pause and unpause ads, and update budgets. Combined with an AI node (Claude or GPT), you build "AI Connectors" — workflows where AI makes the decision and the n8n node executes it.
Is the n8n + Meta Ads stack really free?
Mostly. The Meta Marketing API itself is free. n8n is self-host free. You only pay for AI tokens — typically $50-200/month for active campaigns on Claude or GPT API. If you self-host an open model, that goes to zero.
Total cost vs marketing-automation SaaS:
| Stack | Monthly cost |
|---|---|
| Self-hosted n8n + Claude API | $50-200 |
| n8n Cloud Pro + Claude API | $70-220 |
| Marketing-automation SaaS comparable scope | $300-1,500 |
How is n8n + Meta Ads different from a marketing-automation SaaS?
Three differences:
- Open-source core. n8n has 187k GitHub stars and a fair-code license. You own the workflows, you can self-host, you can fork.
- You write the logic. A SaaS like AdEspresso or Madgicx ships fixed playbooks. With n8n you build whatever rule matches your account — daily ROAS check, hourly creative rotation, weekly budget rebalancing.
- AI is in the loop, not bolted on. Claude or GPT nodes sit anywhere in the flow. The pattern: "fetch performance → ask Claude what to change → apply change."
Real example: a B2B trading company automated campaign creation from product inventory updates — within 3 months they cut manual work 60% and lifted lead gen 25%.
What's the catch?
- You have to build it. SaaS gives you "click to set up daily report." n8n gives you nodes and a canvas. Budget 4-8 hours for your first serious workflow.
- Meta API rate limits apply. Heavy automation can hit Marketing API limits. Build retry-with-backoff into your workflows.
- Auth tokens expire. Meta long-lived tokens last about 60 days. Set a calendar reminder or build a refresh workflow.
Bottom line
If you run more than $5k/month in Meta Ads spend, the AI-Connector pattern in n8n pays for itself in week one — both in saved hours and in catching underperformers faster than a human would. The trade is upfront build time vs ongoing SaaS bills. For most teams, the math is obvious.
Related Nanoflow guides
Want a hand?
Book a 30-min call.
Walk through your stack with us. We'll find the bottleneck and map out the exact wiring you need — free.