How to automate ad campaigns with AI agents
6 real setups for ad campaigns, most-discussed first. Steps come from each source; the full prompt is one click away.
6 real setups on agentsetups show how people automate ad campaigns with AI agents. Agents used: Claude (4), Grok Bot (1), n8n (1).
Fastest start (from Build and launch a Meta lead-gen campaign with Claude Code by The Boring Marketer):
- Browser: let Claude Code use the Chrome extension in Business Manager to create a pixel and a system-user token, and link the assets.
- Creative: feed it inspiration from DTC brands (via scrapecreators); the author made 12 “job photo + text bubble” creatives in 15–20 min.
- Landing page: a calendar-booking quiz funnel to self-qualify leads.
+3 more steps in the copyable prompt.
Last updated · based on 336 use cases on agentsetups, each credited to its author.
1. Build and launch a Meta lead-gen campaign with Claude Code
Claude Code set up the pixel and system-user token via the Chrome extension, wired CAPI tracking and launched by API.
- Browser: let Claude Code use the Chrome extension in Business Manager to create a pixel and a system-user token, and link the assets.
- Creative: feed it inspiration from DTC brands (via scrapecreators); the author made 12 “job photo + text bubble” creatives in 15–20 min.
- Landing page: a calendar-booking quiz funnel to self-qualify leads.
- Tracking: have it pull the pixel and CAPI details, implement and test the events.
- Build: store the system-user token in the environment and have it create and launch the campaigns programmatically.
- Targeting: go broad and optimise for the deep-funnel event, not clicks.
Claude · tools: Meta Business Manager · by The Boring Marketer (X post, 1 Sep 2026) · source
2. Audit your Facebook ads agency with a data warehouse
Put ads, PostHog and CRM data in a warehouse, have a vision model analyse creatives, then let Claude Code find what works.
- Get your ads, PostHog and CRM data into a data warehouse.
- Give Claude Code access to the warehouse and an S3 bucket for storage.
- Pull all ad creative and its conversion data.
- Have a vision model analyse the creative, ad text and landing pages, and build a database from it.
- Have Claude Code analyse that database to find what is and isn’t working.
- Optionally give it a Facebook Ads API key to modify campaigns based on the analysis.
Claude · tools: PostHog, S3, Facebook Ads API · by Cody Schneider (X post, 8 Sep 2026) · source
3. Build your own Meta Ads dashboard with Claude Code
A System User token with ads_read lets Claude Code pull the Marketing API into a custom dashboard.
- In Meta Business Settings, create a System User.
- Give it access to your ad account and generate a token with ads_read permission.
- Hand the token to Claude Code and tell it what you want to track (leading indicators, per-campaign and creative performance).
- It pulls data from the Meta Marketing API and builds the dashboard around your numbers.
Claude · tools: Meta Marketing API · by Chris Panteli (Co-Founder) (X post, 2 Oct 2026) · source
4. Script your Google Tag Manager conversion setup
Claude Code adds dataLayer events, creates Ads conversions by API and builds triggers, GA4, Ads and Meta tags via the GTM API.
- In your app repo, have Claude Code add a dataLayer.push for every key event (signup, demo booked, trial started, checkout).
- Create a Google Cloud project, enable the Tag Manager API and set up OAuth with tagmanager.edit.containers and tagmanager.publish scopes.
- Have it create each conversion action via the Google Ads API to get IDs and labels.
- Have it write a script that builds, in a new GTM workspace: a custom-event trigger per event, GA4 event tags, Ads conversion tags, Meta pixel tags, and data-layer variables for value, currency and hashed email.
- The script creates a version and publishes; verify every tag fires in GTM preview mode.
Claude · tools: Google Tag Manager API, Google Ads API, GA4, Meta Pixel · by Cody Schneider (X post, 17 Sep 2026) · source
5. Sweep your Meta ads for negative comments daily
A Grok Bot set up to sweep Meta ads for negative comments every morning.
- Connect Grok Bot to your Meta ads.
- Schedule a morning sweep for negative comments and a report.
Grok Bot · tools: Meta Ads · by Andrew (X post, 15 Sep 2026) · source
6. Build a click-through UGC video ad maker in n8n
One n8n workflow driven by Form pages: pick a presenter, voice, product shots and best takes; it upscales and joins them into a 1080p ad.
- Build one n8n workflow driven entirely by Form pages, so the user only opens one form URL.
- Ask for counts first (products, intro yes/no) so the next page shows exactly that many fields.
- Generate options at each step (4 presenters, 4 voice previews, product views, scenes) and show a "use / re-roll with a note" page before anything is paid for.
- Film one clip per product with several takes; let the user pick the best take per clip.
- Upscale the picked takes and join them into a 1080p MP4.
- Carry state in one $json.state object through every node so a re-roll keeps earlier choices.
n8n · tools: n8n Forms · by /u/useapi_net (Reddit, 4 Oct 2026) · source
Questions people ask
Which AI agent is best for automating ad campaigns?
In the 6 setups here, the agents named are Claude (4), Grok Bot (1), n8n (1). That is what people used, not a quality ranking.
What do I need to automate ad campaigns with an AI agent?
An agent (Claude, Grok Bot, n8n are the most common here). Each setup lists only the tools its source states.
Is there a prompt I can copy?
Yes. Every use-case page has a copyable prompt with the steps embedded and a “Based on” credit line, for example Build and launch a Meta lead-gen campaign with Claude Code.
Related guides
- Best AI agent for marketing and growth15
- Best AI agent for content and video18
- How to automate email triage with AI agents9
- How to automate a daily briefing with AI agents9
- How to automate lead generation and outbound sales with AI agents8
- How to automate meal planning and grocery orders with AI agents3
- How to automate subscriptions and household bills with AI agents6
- How to automate bookkeeping and invoices with AI agents4