Docs
Plugins
Sources
Facebook Marketing
Overview

Facebook Marketing Source Plugin

Latest: v1.1.1

The Facebook Marketing source plugin for CloudQuery extracts information from the Facebook marketing API (opens in a new tab).

Configuration

This following configuration example connects a Facebook Marketing source to a Postgres destination.

kind: source
spec:
  # Source spec section
  name: facebookmarketing
  path: cloudquery/facebookmarketing
  version: "v1.1.1"
  tables: ["*"]
  destinations: ["postgresql"]

  spec: 
    # Facebook Marketing Spec section
    
    # You can find the ad_account_id in the Facebook Ads Manager: https://www.facebook.com/ads/manager/accounts/
    ad_account_id: "AD_ACCOUNT_ID"
    # See the "authentication section" on how to create an access token
    access_token: "ACCESS_TOKEN"

Authentication

In order for CloudQuery to sync data from Facebook Marketing, you will need a Facebook Marketing access token. You will need to follow the following steps (if you don't have them set up already):

  1. Create a business app in the Meta App dashboard (opens in a new tab). See Facebook's documentation (opens in a new tab). Make sure to choose the "Business" application type, and to link it to your business account.
💡

CloudQuery only ever makes READ calls to the API, but due to the way the Facebook permission model works, some of the tables also require ads_management permissions.