
Meta Ads Agent
Custom SaaS Platforms AI Agents- Meta Ads
- Shopify
- Slack
- Claude
- PostgreSQL
- Python
- Railway
Overview
Before, someone had to open Meta Ads Manager and Shopify every morning and compare the numbers by hand. Now an agent does it overnight and posts a short briefing in Slack. It flags problems and suggests changes, and nothing is changed in Meta without approval.
The Problem
An online store owner spends money on Meta ads every day, and the numbers rarely agree with the store. Meta says it drove one amount of sales. Shopify shows what was really ordered. A broken ad can keep spending for days before anyone notices, and each day of that is money gone. Checking every campaign by hand takes hours. So it gets skipped when the week gets busy.
How It Works
- Every morning at 8:00 AM, the agent pulls yesterday's ad numbers from Meta: spend, impressions, clicks, purchases and revenue, down to each ad.
- It pulls the same days' orders and revenue from Shopify.
- It saves both in a database.
- It compares the revenue Meta claims with the orders Shopify recorded, and flags any day where Meta claims more.
- It calculates ROAS, cost per purchase, CPM, CTR, frequency, and conversion rate, and checks the rules: wasted spend, weak ad sets, tired creative, and room to scale.
- Claude writes the briefing in plain English from those calculated numbers. Claude doesn't do the math.
- It posts a short digest in Slack with a link to the full report page.
- Every hour it checks the alert limits and messages Slack only when one is crossed.
- Suggested changes, such as pausing an ad set or changing a budget, wait for a person to approve them.
- Approved changes run within set limits: a maximum budget change, a daily action cap, and a cooldown. Each one is logged with its before and after state. A kill switch stops everything.


Tech Stack
| Tool | Job in this workflow |
|---|---|
| Meta Marketing API | Supplies ad numbers and carries out approved pauses and budget changes |
| Shopify Admin API | Supplies orders and revenue, the actual sales |
| PostgreSQL | Stores daily snapshots and the full action history |
| Python (FastAPI) | Runs the schedule, the rules, the report page and the control panel |
| Claude API | Writes the daily briefing from the calculated numbers |
| Slack | Delivers the daily digest and alerts |
| Railway | Keeps the agent running around the clock |
| GitHub | Holds the full source code |
The team keeps using Ads Manager and Shopify exactly as before. The only new thing to read is one Slack message each morning.