Connect Meta Ads to your Wiro AI agent
Campaigns, ad sets, ads, audiences and insights on Facebook and Instagram ads.
Break down last month's Meta spend for Lanternfield Candles by age and placement, and point out what didn't bring purchases.
Last month the account spent $6,420 for 214 purchases, about $30 each. Three slices took money with little back:
- Audience Network: $780 for 2 purchases
- Instagram Reels: $1,040 for 9 purchases, $116 each
- Ages 18 to 24: $1,350 for 11 purchases, $123 each
Ages 35 to 54 bought at $21 a purchase. Should I draft placement and age changes for you to approve?
Overview
What Meta Ads does for your agent
Takes a system user token from Meta Business Settings, or a Facebook sign-in through your own Meta app, and works only on the ad accounts and Pages you pick. The agent reads insights broken down by age, gender, country, placement and device, sizes audiences, uploads images and videos, builds creatives, creates campaigns, ad sets and ads, turns them on or off, changes budgets and deletes them. Campaigns, ad sets and ads it creates start paused, and Meta reviews each ad before it runs.
Use cases
What your Wiro agent can do with Meta Ads
A Monday report on spend, results and ROAS for every campaign
Each Monday morning, a Scheduled Task collects last week's spend, results, cost per result and ROAS for each campaign in your chosen ad accounts and puts them beside the previous week. Campaigns whose cost per result went up are listed first, and the whole table goes to Chat.
The ages, countries and placements that use budget without results
Ask the agent to break last month's results down by age, gender, country, placement or device. It shows where spend went without results and which segments convert for less, then drafts the targeting or placement changes for you to approve.
A new campaign from a brief and a few creatives, created paused
Share the offer, budget, audience and links to your images or video. The agent uploads the media, writes the primary text and headline, builds an image, video or carousel creative for your Page, and creates the campaign, ad set and ads paused. They stay off until you ask the agent to turn them on, and Meta reviews each ad before it runs.
A morning budget and ad fatigue check with changes you approve
Each morning, the agent compares every active ad set's cost per result with your target and looks for ads whose frequency climbs while their click-through rate falls. It lists the budget raises and pauses it recommends; reply in Chat with the ones you want and it applies them, showing each value before and after.
Audience sizing before you spend on a new ad set
Describe your customer and ask for matching interests, job titles, employers or locations. The agent finds Meta's targeting options with their size ranges and estimates how many people a combined spec reaches, so you can compare a few audiences before an ad set is created.
A daily watch on account status and spend caps
A daily Scheduled Task checks each chosen ad account's status, amount spent, balance and spend cap. It warns in Chat when an account is disabled, with the reason Meta gives, or when spend gets close to the cap, so a stop in delivery does not go unnoticed.
How it works
How Meta Ads works with Wiro
- 01
Connect Meta Ads
Deploy an agent, open its Connectors tab, choose Meta Ads and sign in with your Meta Ads account, or paste an API key.
- 02
Choose what each action may do
Set each Meta Ads action to Allow, Ask or Block, in Chat and in Scheduled Tasks. By default, read-only actions run, and the rest ask first in Chat.
- 03
Ask in Chat or schedule it
Ask your agent for Meta Ads work in Chat, or put it on a Scheduled Task that runs on its own.
- Where it runsInside your agent. Its requests go straight from the agent to Meta Ads.
- Where its data goes
graph.facebook.com - How it signs inSign in to Meta Ads with your own app, or connect with a key.
- AccountsAfter connecting, pick the Meta ad accounts, Facebook Pages for ads the agent may work with. It cannot reach any other.
What it can do
Actions your Wiro agent can take in Meta Ads
By default, read-only actions run, and the rest ask first in Chat and run in Scheduled Tasks. Each agent can set any action to Allow, Ask or Block.
Read-only 11 actions
Looks things up in Meta Ads and changes nothing.
| Action | What it does | Chat | Scheduled Tasks |
|---|---|---|---|
| List Meta ad accounts | Lists the ad accounts this connection can use, with id, name, status, currency, time zone and the connected account's tasks. | Allow | Allow |
| Get a Meta ad account | Returns an ad account's status (and why it is disabled), the connected account's tasks on it, currency, time zone, amount spent, balance, spend cap and minimum daily budget (money in the currency's minor unit). | Allow | Allow |
| List Facebook Pages for ads | Lists the Facebook Pages this connection can use in ad creatives. | Allow | Allow |
| Get Meta Ads insights | Reads ad performance for an ad account at account, campaign, ad set or ad level: spend, impressions, reach, clicks, CTR, CPC, CPM, frequency, actions, cost per action and ROAS by default. | Allow | Allow |
| List Meta campaigns, ad sets, ads or creatives | Lists an ad account's campaigns, ad sets, ads or creatives, newest first, with status, effective status and, for campaigns and ad sets, budgets, bid strategy and schedule. | Allow | Allow |
| Get a Meta campaign, ad set, ad or creative | Returns one campaign, ad set, ad or creative with its ad account, status, effective status and settings (budgets in minor units, targeting, creative). | Allow | Allow |
| List Meta custom audiences | Lists an ad account's custom and lookalike audiences with their size range, source, delivery status and last update. | Allow | Allow |
| List Meta ad images or videos | Lists an ad account's uploaded ad images (hash, name, URL, size) or ad videos (id, title, processing status, length). | Allow | Allow |
| Search Meta targeting options | Finds targeting ids for an ad set: interests, places, languages (adlocale), employers, job titles, schools and fields of study, with the audience size range Meta gives. | Allow | Allow |
| Estimate a Meta Ads audience | Estimates how many people a targeting spec reaches in an ad account (the monthly active range Meta gives), for an optimization goal. | Allow | Allow |
| Read other Meta Ads data | Reads what the actions above do not cover, straight from the Meta Ads API. | Allow | Allow |
Create and send 6 actions
Creates or sends something new in Meta Ads, such as a post, a message or an email.
| Action | What it does | Chat | Scheduled Tasks |
|---|---|---|---|
| Create a Meta Ads campaign (paused) | Creates a campaign in an ad account, always paused, with an objective, special ad categories, and optionally a campaign budget (daily or lifetime, in minor units) and bid strategy. | Ask | Allow |
| Create a Meta ad set (paused) | Creates an ad set in a campaign, always paused: targeting, optimization goal, billing event, and, unless the campaign has its own budget, a daily or lifetime budget in minor units. | Ask | Allow |
| Upload a Meta ad image | Downloads an image from a public https URL (JPEG, PNG or GIF, up to 30 MB) and uploads it to an ad account's image library. | Ask | Allow |
| Upload a Meta ad video | Adds a video to an ad account from a public https URL (Meta downloads it; MP4 or MOV). | Ask | Allow |
| Create a Meta ad creative | Creates an ad creative for one of the chosen Facebook Pages (and optionally an Instagram account): an image ad, a video ad or a carousel of 2 to 10 cards, with primary text, headline (40) and description (30). | Ask | Allow |
| Create a Meta ad (paused) | Creates an ad in an ad set from a creative, always paused. | Ask | Allow |
Change and delete 4 actions
Changes or deletes what is already in Meta Ads.
| Action | What it does | Chat | Scheduled Tasks |
|---|---|---|---|
| Turn a Meta campaign, ad set or ad on or off | Sets a campaign, ad set or ad to ACTIVE (it can start spending), PAUSED or ARCHIVED, after checking it belongs to a chosen ad account. | Ask | Allow |
| Change a Meta campaign or ad set budget | Changes the budget of a campaign or ad set after checking it belongs to a chosen ad account: daily or lifetime budget, bid amount, spend cap (campaigns) or end time (ad sets). | Ask | Allow |
| Delete a Meta campaign, ad set or ad | Deletes a campaign, ad set or ad after checking it belongs to a chosen ad account. | Ask | Allow |
| Make other Meta Ads changes | Sends any other change straight to the Meta Ads API. | Ask | Allow |
How to connect
Connect Meta Ads to Wiro
Open the agent's Connectors tab, choose Meta Ads and sign in with your account. The consent screen shows what the agent can reach.
What the Connect dialog asks for
Pick one way in the Connect dialog: it asks only for what that way needs.
Your own app
App ID and App Secret from your own Meta Ads app, then you sign in to Meta Ads in its own window.
| Field | About |
|---|---|
| App IDRequired |
|
| App SecretRequired |
|
API key
The key, pasted once instead of a sign-in.
| Field | About |
|---|---|
| System User TokenRequired | Use a token generated for a Business Manager System User, not a personal Facebook login token.
No App ID or App Secret is required for this direct connection. The Meta app used to generate the token must not enforce |
Troubleshooting
Troubleshooting Meta Ads
What to check when Meta Ads stops working for your agent.
- Your own app's sign-in fails Check your app's settings in Meta Ads: the redirect URL shown in the Connect dialog must be added there, and the client secret you pasted must be the app's current one. Then sign in again.
- Access revoked in Meta Ads If the access is removed in Meta Ads, or the sign-in can no longer renew, the connection reads Reconnect needed. Open the agent's Connectors tab, choose Meta Ads and Reconnect.
- An invalid or expired key If Meta Ads refuses the key, for example after it was deleted or expired, the agent's Meta Ads actions fail. Create a new key in Meta Ads, then open the agent's Connectors tab, choose Meta Ads and paste it in place of the old one.
- Limits set by Meta Ads Meta Ads limits how much an account can do, such as how many requests it takes in a minute. An action over a limit fails until the limit resets: wait and ask again, or check your Meta Ads plan.
For developers
Connect Meta Ads from your own product
Every call is a POST to the Wiro API with your project's API key. On a sign-in, your customers see your own app's name.
- 01
Read the connector
Detail answers without a session: what the connector needs and the tools it gives an agent.
POST /AgentConnector/Detail { "slug": "meta-ads" }Response { "result": true, "errors": [], "agentconnectors": [ { "slug": "meta-ads", "title": "Meta Ads", "category": "ads", "authtype": "provider-oauth", "credentialfields": [ { "name": "appid", "label": "App ID", "required": true, "secret": false, "format": "text" }, { "name": "appsecret", "label": "App Secret", "required": true, "secret": true, "format": "password" }, { "name": "systemusertoken", "label": "System User Token", "required": true, "secret": true, "format": "password" } ], "accountpickers": [ { "key": "ad_accounts", "label": "Meta ad accounts", "multiple": true }, { "key": "pages", "label": "Facebook Pages for ads", "multiple": true } ], "tools": [ { "name": "list_ad_accounts", "readonly": true }, { "name": "get_ad_account", "readonly": true } ] } ] } - 02
Start the sign-in
Connect answers with the vendor's sign-in page. Open it in the browser of the person who owns the account.
POST /UserAgent/ConnectorConnect { "useragentguid": "YOUR_AGENT_GUID", "slug": "meta-ads", "mode": "oauth", "values": { "appid": "YOUR_APPID", "appsecret": "YOUR_SECRET" }, "redirecturl": "https://your-app.example.com/connectors/return" }Response { "result": true, "errors": [], "status": "pending", "authorizeUrl": "https://vendor.example.com/oauth/authorize?client_id=...&state=..." } - 03
Come back to your page
After the consent screen the browser returns to your redirect URL with the outcome in its query. Read the status next; the query is only a reason to look.
Your redirect URL https://your-app.example.com/connectors/return?connector_connected=true https://your-app.example.com/connectors/return?connector_error=authorization_denied - 04
Or connect with a key
The same call with mode "key" connects with a pasted key instead of a sign-in.
POST /UserAgent/ConnectorConnect { "useragentguid": "YOUR_AGENT_GUID", "slug": "meta-ads", "mode": "key", "values": { "systemusertoken": "YOUR_SECRET" } }Response { "result": true, "errors": [], "status": "connected", "applied": 1, "restart": "scheduled" } - 05
Read the status
connected, pending (a sign-in not finished), reauth (sign in again) or error. Values and tokens never come back.
POST /UserAgent/ConnectorList { "useragentguid": "YOUR_AGENT_GUID" }Response { "result": true, "errors": [], "useragentconnectors": [ { "slug": "meta-ads", "title": "Meta Ads", "authtype": "provider-oauth", "status": "connected", "accounts": {}, "savedvariables": [ "appid", "appsecret" ], "lasterror": null } ] } - 06
List the accounts
After connecting, list what the agent may use. It cannot reach anything else.
POST /UserAgent/ConnectorAccounts { "useragentguid": "YOUR_AGENT_GUID", "slug": "meta-ads" }Response { "result": true, "errors": [], "pickers": [ { "key": "ad_accounts", "label": "Meta ad accounts", "multiple": true, "candidates": [ { "id": "1234567890", "name": "Example account" } ], "selected": [] }, { "key": "pages", "label": "Facebook Pages for ads", "multiple": true, "candidates": [ { "id": "1234567890", "name": "Example account" } ], "selected": [] } ] } - 07
Save the accounts
Every id is checked against a fresh list, then the agent uses them, with no restart for most changes.
POST /UserAgent/ConnectorSetAccounts { "useragentguid": "YOUR_AGENT_GUID", "slug": "meta-ads", "accounts": { "ad_accounts": [ "1234567890" ], "pages": [ "1234567890" ] } }Response { "result": true, "errors": [], "restart": "scheduled" } - 08
Disconnect
Revokes a sign-in where the vendor allows it, deletes what the connection holds and removes the connector from the running agent.
POST /UserAgent/ConnectorDisconnect { "useragentguid": "YOUR_AGENT_GUID", "slug": "meta-ads" }Response { "result": true, "errors": [], "removed": true, "revoked": true, "restart": "scheduled" }
Questions
Meta Ads and Wiro FAQ
What can a Meta Ads AI agent do with my ad accounts?
It reads insights for ad accounts, campaigns, ad sets and ads, with breakdowns by age, gender, country, placement and device. It lists campaigns, ad sets, ads, creatives, custom and lookalike audiences and your uploaded media, searches targeting options and estimates audience size. It can upload images and videos, build image, video and carousel creatives for your chosen Pages, create campaigns, ad sets and ads, turn them on or off, change budgets and delete them. Lead form data and access tokens stay out of its reach.
How do I connect Meta Ads to an AI agent?
Meta Ads sits on the agent's Connectors tab, and a request in Chat gets the agent to add it too. There are two ways in. With your own Meta app, type in its App ID and App Secret, then sign in with Facebook in the window that opens. With a key, paste a System User token from Meta Business Settings; no app keys are needed then. Either way, you then pick the ad accounts and Facebook Pages the agent may use.
Should I use a System User token or sign in through my own Meta app?
A System User token belongs to your business rather than to a person, and when Meta offers the option you can set it to never expire, which suits Scheduled Tasks that automate Meta Ads work. Assign the ad accounts to the System User with the ADVERTISE and ANALYZE tasks, plus the Pages you advertise with. Signing in through your own app uses your personal Facebook access instead; Meta's long-lived sign-in lasts about 60 days, after which the connector asks you to sign in again.
Will the agent launch ads or raise budgets without my approval?
Campaigns, ad sets and ads are always created paused, and switching one on is a separate action. In Chat, switching things on, changing budgets and deleting need your approval first by default, and Meta still reviews every ad before it runs. On a schedule, the same actions go ahead by default, so set them to Ask or Block under Scheduled Tasks when every change needs a person's approval. A deleted campaign cannot run again, so pausing is the safer choice when you may want something back.
Which Meta permissions does the connection need?
ads_management, ads_read and business_management for the ad accounts. For creatives that run from a Facebook Page, add pages_show_list, pages_read_engagement and pages_manage_ads. With your own app, enable them under App Review; with a System User token, grant them when you generate the token. The app behind a System User token must not require an app secret proof on every server call.
Can I limit the agent to some ad accounts and Pages?
Yes. After connecting, pick the ad accounts and Facebook Pages the agent may use; it cannot reach any others, and each change is checked against that list before it is sent. On an ad account where your access has only the ANALYZE task, the agent can report but cannot change anything.
Where is my Meta token stored, and what does the connector cost?
The token is kept encrypted, and the AI model works with the results, never with the token itself; an App ID and App Secret only serve the sign-in. No agent plan charges extra for the Meta Ads connector. Meta does not charge for Marketing API calls either, but your ad spend is billed by Meta as usual and Meta's rate limits apply to your app.
Is this a Meta Ads MCP server I need to run myself?
No. Meta Ads works from inside your agent, sending each request straight to Meta's Marketing API with your token, so there is no Meta Ads MCP server for you to install or host.
Access
Revoke Meta Ads access
Remove the app's access in your Meta Ads account's connected apps settings, then disconnect it here.
Related connectors
More ads connectors for your Wiro agent
Put Meta Ads to work with Wiro
Deploy an agent and connect Meta Ads from its Connectors tab. Every agent plan includes it: Starter $5, Pro $30 and Max $100 a month.