With Sheetgo, you can seamlessly connect your Facebook Ads account to Google Sheets and automate the retrieval of campaign insights such as impressions, clicks, CPC, reach, and conversions. This integration enables marketing teams to centralize campaign performance data in one place, create live dashboards, and analyze key advertising metrics without manually exporting data from Meta Ads Manager.
Prerequisites
- A Facebook Developer Account (developers.facebook.com)
- A Facebook App created within your Developer Dashboard
- A Long-Lived Access Token generated through the Graph API Explorer (Graph API Explorer)
- Access to the Facebook Marketing API documentation (Marketing API Docs)
- The Ad Account ID you wish to extract data from
Step 1: Identify the Required API Endpoint
The Facebook Marketing API offers multiple endpoints under the Graph API for retrieving advertising data. Visit the Marketing API Reference to select the correct endpoint. For example, to retrieve ad insights such as impressions, clicks, and spend, you can use the /ads or /insights endpoint. Example base URL: https://graph.facebook.com/v18.0/act_
/insights. You can append parameters such as fields=campaign_name,ad_name,impressions,clicks,spend,date_start,date_stop to specify the desired metrics and dimensions.
Step 2: Generate API Credentials
Log in to your Facebook Developers Dashboard and create an app if you don’t have one. Under Tools → Graph API Explorer, generate a user access token with ads_read and ads_management permissions. Then, exchange this short-lived token for a long-lived token using the OAuth endpoint provided in the documentation. Long-lived token URL (for manual exchange): https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=
&client_secret=
&fb_exchange_token=
. This long-lived token can last up to 60 days and will be used to authenticate your Sheetgo connection.
Step 3: Open the Sheetgo API Connector
Log in to Sheetgo and open an existing workflow or create a new one. Click on Connect and choose API Request under Data Source. Then select HTTP Request as the method type. You’ll be prompted to enter the API URL and configure authentication and headers.
Step 4: Configure the API Request in Sheetgo
In Sheetgo, create a new workflow and select HTTP Request as your source. Paste your Facebook Ads API endpoint (for example): https://graph.facebook.com/v18.0/act_
/insights?fields=campaign_name,ad_name,impressions,clicks,spend,date_start,date_stop. Then, in the Headers (JSON) field, insert the following configuration to include authorization, pagination, and refresh logic (if required):
{ 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', '@pagination': { 'type': 'page', 'page_param': 'offset', 'per_page_param': 'limit' }, '@refresh_token': { 'auth_method': 'oauth2', 'auth_type': 'OAuth', 'refresh_url': 'https://graph.facebook.com/oauth/access_token', 'refresh_params': { 'client_id': '', 'client_secret': '', 'refresh_token': '', 'grant_type': 'fb_exchange_token' } } }This JSON structure ensures that Sheetgo will handle pagination automatically if your insights data spans multiple pages, and can refresh tokens dynamically when using OAuth2.
Step 5: Choose the Destination Spreadsheet
Once the request is successfully configured, select the destination Google Sheet where your Facebook Ads data should appear. You can either create a new sheet or select an existing one in your Google Drive. Each time your workflow runs, Sheetgo will pull the latest performance data from Facebook Ads into this sheet for analysis and visualization.
Step 6: Execute the Sheetgo Connection
Click Finish and Save to finalize the configuration. Run the connection manually once to verify that your data loads correctly. After confirming, set up automatic refresh scheduling to update your spreadsheet daily or weekly. This ensures your dashboards and reports always reflect the latest Facebook Ads campaign performance.
