Facebook Ads
Query Meta Marketing API data from inside an artifact via a workspace connector. Connect with a pasted long-lived access token plus your ad account ID — no ShareOut OAuth flow.
Setup (workspace admin)
Section titled “Setup (workspace admin)”- In Meta for Developers, create an app
with Marketing API access and generate a long-lived user access token with
ads_read. - Note your ad account ID (e.g.
act_123456789). - In ShareOut → workspace Connectors, choose Facebook Ads, paste the token and account ID, and Test before saving.
Query from an artifact
Section titled “Query from an artifact”const sdk = await ShareOut.create();
const { data } = await sdk.connection('meta_ads').fetch({ endpoint: 'insights', params: { date_preset: 'last_30d', level: 'campaign', fields: 'campaign_name,spend,impressions,clicks,purchase_roas', },});The provider calls graph.facebook.com/v21.0. Credentials stay server-side;
the artifact references the connector by name only.
Rate limits
Section titled “Rate limits”~200 requests/min per connection, with server-side caching (default 5 min TTL).
Related
Section titled “Related”- Workspace connections — create and test connectors
- Google Ads — similar token-shim pattern