- Agentic Brand
- Posts
- Step-By-Step: Build Your Meta Ad Uploader AI Agent
Step-By-Step: Build Your Meta Ad Uploader AI Agent
Learn to build an AI agent that uploads hundreds of ads to your Meta ad account
Let's build an AI agent that uploads Meta ads automatically from creator videos. It handles thousands of videos without you touching the Ads Manager.
First let's diagram what we're building:
Then the step-by-step build in n8n so you can follow along.
What We're Building
An agent that takes creator videos, creates ad sets, uploads the videos to Meta, and publishes the ads. All on a schedule, all automatically.
How We'll Set It Up
The workflow runs on a schedule trigger. Every few minutes it checks an n8n data table for the next video to process. The table tracks everything: creator username, video ID, URL, and status flags for each step.
Before uploading, it pulls video info from a Google Sheet and checks two things. First, the video needs a score above 50. Second, the transcript can't mention TikTok, Target, or Amazon. We're running these as Meta ads so we don't want creators saying "visit my TikTok shop" in the middle of our ad.
The Orchestrator Pattern
Here's the key part. We don't use one big agent for everything.
If you try to make a single agent create ad sets, upload videos, and create ads, your context window fills up fast. The agent gets confused and makes mistakes.
Instead we use an orchestrator with sub-agents. The main agent coordinates. It has two agents as tools.
The first one only creates ad sets. It uses dtc.sh's Meta MCP server with just the create ad set tool. Very specialized. It doesn't get confused and it's always correct.
The second one only uploads videos. Same MCP server, different tool.
Both agents return structured outputs. Ad set ID, video ID. The orchestrator collects these and passes them to the ad creator agent, which needs both IDs to create the final ad.
The Demo
In the video you'll see the workflow pick up a video and process it end to end.
The orchestrator calls the ad set agent first. It creates the ad set and returns the ID. Then it calls the video uploader agent. Video gets uploaded, ID comes back.
Then the ad creator agent takes both IDs, adds the caption and CTA from the system prompt, and creates the ad in Meta.
Once it's done, the data table gets updated. Ad set ID, ad ID, status marked as finished. Next time the schedule runs, it skips that video and picks up the next one.
We're processing thousands of creator videos for this brand. Doing this manually would take forever.
With this setup, videos flow through automatically. The agents handle the Meta API calls. The data table tracks progress. You just watch the ads show up in Ads Manager.
Want to implement this Meta Ad Uploader at your brand? Reply to this email or DM Bora on LinkedIn.