C
Cody
Marketing & Ads

Connecting OpenClaw with Facebook Ads: A Practical Guide

·3 min read

Meta's Marketing API is the path to getting Facebook and Instagram ad data into OpenClaw. The API is powerful, but gaining access requires a formal app review process and a business verification step.

How OpenClaw Integrations Work

OpenClaw is a self-hosted AI assistant that runs on your own server — typically an EC2 instance — and connects to Slack. It uses Claude under the hood to process requests. Out of the box, OpenClaw doesn't ship with pre-built connections to third-party tools. Instead, integrations are built using the skills system: markdown files in ~/.openclaw/skills/ that give Claude instructions for a particular domain, combined with HTTP tool calls to any API you expose to it.

In practice, adding a real integration means: getting API credentials from the third-party service, building or configuring a small proxy/endpoint that OpenClaw can call, and writing a skill file that tells Claude how to use it. For some tools this is an afternoon of work. For others — like Facebook Ads — it's considerably more involved.

Connecting OpenClaw with Facebook Ads: Step by Step

Step 1: Create a Meta Developer App and Get Business Verification

Go to developers.facebook.com, create an app, and select 'Business' as the app type. To access the Marketing API in production, your business must be verified through Meta Business Manager — this involves submitting business documentation and typically takes 1–5 business days.

Step 2: Request the Marketing API Permissions

In App Review, request the ads_read permission (to read ad account data) and ads_management if you need to make changes. Meta reviews these requests. Standard permissions like ads_read are usually granted without a lengthy review, but advanced permissions require a detailed use case description and screencast.

Step 3: Implement OAuth and Build the Proxy

Meta uses OAuth 2.0 with long-lived access tokens (valid for 60 days). System User tokens (available through Meta Business Manager) are better for server-to-server integrations — they don't expire like user tokens. Build your proxy around the Marketing API endpoints (/v19.0/{ad_account_id}/insights is your key endpoint for performance data) and write the skill file.

Challenges and Caveats

App Review Can Be Slow and Unpredictable

Meta's app review process has a reputation for inconsistency. Reviews can take days or weeks, and requests can be rejected for reasons that aren't always clearly communicated. Build extra time into your project plan.

Token Management Is Non-Trivial

User tokens expire. System User tokens are more stable but require specific Business Manager setup. Whichever you use, build token refresh and expiry handling into your proxy from day one.

Rate Limits Are Usage-Dependent

Meta's API uses a score-based rate limiting system that depends on your app's recent usage patterns. It's not a simple requests/hour limit — it can be hard to predict when you'll hit a limit.


Skip All of This — Use Cody Instead

Cody includes Facebook Ads integration out of the box. No app review, no business verification, no token management — just ask your Slack bot about ROAS and get an answer.

Get started with Cody →


Related Guides


Need the model-flexible version? See: How to Connect Facebook Ads to OpenClaw: Setup, Models, and Workflow Guide.