← Back

Meta Ads Agent

Custom SaaS Platforms🤖 AI Agents
Works with
  • 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

  1. 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.
  2. It pulls the same days' orders and revenue from Shopify.
  3. It saves both in a database.
  4. It compares the revenue Meta claims with the orders Shopify recorded, and flags any day where Meta claims more.
  5. 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.
  6. Claude writes the briefing in plain English from those calculated numbers. Claude doesn't do the math.
  7. It posts a short digest in Slack with a link to the full report page.
  8. Every hour it checks the alert limits and messages Slack only when one is crossed.
  9. Suggested changes, such as pausing an ad set or changing a budget, wait for a person to approve them.
  10. 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.
4955fdd17e877c23aac67a73.png
342f8fae14427292eaddbdd2.png

Tech Stack

ToolJob in this workflow
Meta Marketing APISupplies ad numbers and carries out approved pauses and budget changes
Shopify Admin APISupplies orders and revenue, the actual sales
PostgreSQLStores daily snapshots and the full action history
Python (FastAPI)Runs the schedule, the rules, the report page and the control panel
Claude APIWrites the daily briefing from the calculated numbers
SlackDelivers the daily digest and alerts
RailwayKeeps the agent running around the clock
GitHubHolds 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.