# Meta Ads

> Create and edit Facebook and Instagram campaigns, ad sets, ads, carousels, targeting, custom and lookalike audiences, and review Meta diagnostics in chat.

Roasby connects to **Meta Ads** (Facebook and Instagram) so your AI assistant can build paused campaigns, add ad sets and ads, edit copy and targeting, create audiences and monitor delivery health — all behind your guardrails and change log.

> [!NOTE]
> Meta's **ad sets** appear as **ad groups** across Roasby's UI and tools. Meta enforces up to **4 budget changes per hour per ad set** and **1 edit every 30 seconds** per campaign, ad set or ad.

## Creating a Meta Ads campaign

Use `preview_create_meta_campaign` (then `apply_change`) to create a paused campaign with its first ad set and 1 to 5 ads in one step:

- **Objectives:**
  - **Traffic:** link clicks to your website (or Messenger / Instagram Direct conversations).
  - **Sales:** website conversions using a pixel (`pixel_id` from `list_conversion_actions`) and event (e.g. `purchase`). Set `advantage_plus: true` for an **Advantage+ sales campaign** (campaign budget, Advantage+ audience on, automatic placements). Sales can also open Messenger chats while still optimizing for your pixel event.
  - **Leads:** website leads using a pixel and event (e.g. `lead` or `contact`). Instant lead forms are created in Meta Ads Manager.
  - **Engagement:** ad engagement (or Messenger / Instagram Direct conversations).
  - **Awareness:** reach.
- **Budget:** choose **campaign budget** (`budget_level: campaign`, Advantage campaign budget), **ad set budget** (`budget_level: ad_set`, each ad set owns its own daily budget), or a **lifetime budget** with an end date (checked against your max daily budget per 24 hours remaining, both at creation and when enabled).
- **Bidding:** **lowest cost** (default), **cost cap** (capped by **max target CPA**), **bid cap** (capped by **max bid**) or **minimum ROAS** (Sales only, floored by **min target ROAS**).
- **Audience & placements:** up to 25 countries (or regions/cities via `search_targeting`), optional `excluded_countries`, ages 18–65, languages, gender, interests, custom/lookalike audiences to include or exclude, placements and `advantage_audience` (off by default).
- **Identity:** pick one of your business's **Facebook Pages** (`page_id` from `list_ad_accounts`) and optionally an **Instagram account** (`instagram_account_id`). Without an Instagram account, Meta displays your Page on Instagram.
- **Ad formats (1–5 ads):**
  - **Single image or video:** direct `image_url` or `video_url` (optional `thumbnail_url`) that Meta downloads, a library `image_hash` (from `list_media`), or an existing `post_id`. Optionally pair a `vertical_image_hash` or `vertical_video_url` (9:16) for Stories and Reels alongside feed creative (1:1 or 4:5).
  - **Multi-text ads:** up to 5 primary texts, headlines and descriptions (`more_*` fields, using `image_hash` or `video_url`; available on Sales, Leads, Engagement and Awareness).
  - **Carousels:** 2–10 cards, each with its own headline, link and image/video.
  - **Messaging ads** (Messenger / Instagram Direct): single image ads only.

### Compliance and declarations

- **Special ad categories:** your assistant asks whether ads cover **housing**, **employment**, **financial products/services** or **social issues/elections/politics**. The first three force ages 18+ and all genders (and ≥ 25 km city radius); political/social-issue ads must be created in Meta Ads Manager.
- **EU targeting:** targeting any EU country requires `dsa_payor` and `dsa_beneficiary`.
- **Singapore & Taiwan:** requires verified identity IDs (`regional_beneficiary_id`, `regional_payer_id`). Roasby automatically reuses IDs from the newest ad set in the account that has them and names that ad set in the preview so you can confirm; otherwise paste both IDs from Meta Business Settings → Verified identities. Providing IDs also declares Australia, Thailand, Malaysia and Brazil when targeted.

> [!WARNING]
> Share-page links from Google Drive, Dropbox (`dl=0`), Google Photos, OneDrive or iCloud open a web page instead of the file. Roasby refuses them upfront — use a direct file URL or an `image_hash` from `list_media`.

## Adding ad sets and ads

Grow any existing Meta campaign (matching the objectives above) with paused additions:

- **Ad sets (`preview_add_meta_ad_sets`):** add 1 to 10 paused ad sets in a single preview (each with targeting, Page, Instagram identity and up to 5 ads). Under ad-set budgets, each carries its own `daily_budget_micros`; under cost/bid cap campaigns, its own `bid_amount_micros`.
- **Single ad (`preview_add_meta_ad`):** add one paused ad to an existing ad set.

If Meta fails halfway through creating a campaign, the partial campaign stays paused and the change log shows its Meta ID — ask your assistant to add the missing ad set or ads instead of creating a duplicate campaign.

## Editing ads, targeting and ad sets

- **Edit an ad (`preview_update_meta_ad`):** change `primary_text`, `headline`, `description`, `link`, `call_to_action`, `url_tags`, `instagram_account_id`, multi-text lists (`more_*`) or carousel `cards` (headline, description, link). Meta creatives are immutable, so Roasby swaps in a new creative while preserving media; Meta re-reviews the ad, and reverting swaps the original creative back.
- **Edit targeting (`preview_update_meta_ad_set`):** replace only the sections you pass — `locations` (countries, regions, cities with 17–80 km radius), `excluded_countries` (countries the ads never show in; not under a special ad category), `languages`, `gender`, `age_min`/`age_max`, `interests`, `audiences` (`included`/`excluded`), `placements` or `advantage_audience`. Untouched sections (including zip codes or excluded regions) stay intact.
- **Edit end date (`preview_update_meta_ad_set`):** set `end_date` (`YYYY-MM-DD`) or clear it (`null` — lifetime budget ad sets must keep an end date; daily budget ad sets must run > 24 hours).
- **Budgets & bids:** change campaign or ad-set daily budgets via `preview_update_campaign_budget` (or on [Campaigns](/docs/campaigns)), and bid-cap amounts via `preview_update_bids`.
- **Conversion events:** Meta forbids changing the pixel or conversion event on a published ad set. Add a new ad set with the desired event and pause the old one.

## Custom and lookalike audiences

Your assistant reads existing audiences with `list_audiences` (type and estimated size) and creates new ones with `preview_create_meta_audience`:

- **Website audience:** people who triggered a pixel event or visited your site in the last 1–180 days.
- **Engagement audience:** people who engaged with your Facebook Page or Instagram account in the last 1–365 days.
- **Lookalike audience:** 1–10% of each target country based on a source audience of at least 100 people.

> [!WARNING]
> Meta cannot pause audiences and Roasby never deletes them, so creating a Meta audience **cannot be reverted**. It requires **Allow changes that can't be reverted** in Workspace settings and a second confirmation in chat. An audience reaches nobody until an ad set targets or excludes it.

## Diagnostics, breakdowns and conversions

- **Breakdowns:** `get_campaign_performance` returns 30-day results broken down by country, device, placement, age and gender (refreshed daily).
- **Delivery health:** `list_ad_entities` reports each ad set's `learning_stage` (`learning`, `learning_limited`, `active`), `delivery_issue`, 7-day `weekly_frequency` and each ad's live `preview_url`. High frequency (4+) and learning-limited ad sets trigger [Anomaly alerts](/docs/alerts); tired ads appear in [Recommendations](/docs/recommendations).
- **Conversions & ROAS:** Roasby reports each ad set's optimized results as conversions (or purchases and leads for click/reach ad sets), and purchase/event value for ROAS. `list_conversion_actions` shows pixel health and 24-hour browser vs server (CAPI) event counts.

## Ask your AI assistant

- `list_ad_accounts` & `list_media` — check available Pages, Instagram accounts and library `image_hash` values.
- `search_targeting` & `list_audiences` — look up Meta locations, interests, languages and audiences.
- `preview_create_meta_campaign`, `preview_add_meta_ad_sets`, `preview_add_meta_ad` — create paused campaigns, ad sets and ads.
- `preview_update_meta_ad` & `preview_update_meta_ad_set` — edit ad copy/carousels, targeting or end dates.
- `preview_create_meta_audience` — create a website, engagement or lookalike audience (irreversible).
- `preview_archive_entity` — archive a paused Meta campaign, ad set or ad (irreversible).

Try asking:

- *"Create a paused Meta Sales campaign optimizing for purchases at $25/day with this video link."*
- *"Create an Advantage+ sales campaign for our course in the US and UK at $30/day."*
- *"Create a 30-day website visitors audience and exclude it from my Prospecting ad set."*
- *"Check my Meta ad sets for learning-limited status or ad fatigue over the last 7 days."*

## Limitations

- Meta Ads has no keywords, search terms, negative keywords, text assets or keyword research.
- App promotion, WhatsApp ads, instant lead forms, customer-list audiences and political/social-issue ads are managed in Meta Ads Manager.
- Ad media, Page-post ads, lead/messaging ads and placement-specific text overrides cannot be edited in place — add a new ad and pause the old one.
- Lifetime budgets, start dates, ad schedules, frequency caps and non-bid-cap bid strategy changes stay in Meta Ads Manager.
- Minimum ROAS and lifetime-budget campaigns do not accept new ad sets through Roasby.
- Complex detailed targeting (behaviors, demographics, multiple interest groups), zip codes and excluded regions or places are preserved as-is and edited in Ads Manager.

See every limit by platform on [Limitations](/docs/limitations).
