Back to Blog

How to Import Facebook Ads to Google Sheets

How many campaigns do you have in your Facebook Ads Manager? We don’t have too many, but we still need to have their details in a spreadsheet to monitor the efficiency. For this, we’ve simply exported Facebook Ads data to Google Sheets. One way to do this is manual – export data as a CSV or Excel file and then upload the file to Google Sheets. Another way is to use Facebook API to auto-export data. Both options are described below.

Facebook Ads to Google Sheets – manual approach

Go to the Ads Manager and select the campaign(s) you want to export from Facebook. Click the Export & Import button and choose one of the three options:

  • All – to export data of all campaigns
  • Selected – to export data of the selected campaigns
  • Customize Export – to select the columns you want to export

If you’re in the expanded view, you’ll find the export functionality by clicking the More menu.

Once you click All or Selected (we chose Selected in our example), you’ll be asked to choose the format for the export file: Excel, CSV, or textual.

Click Export and a file will be downloaded to your device.

How to export from multiple Facebook Ad accounts at once

Having to manage multiple ad accounts can be a pain, but you can group the reporting process to export data from multiple Facebook Ad accounts at once. All you have to do is:

  • Select your accounts.
  • Choose a layout.
  • Configure the graph to show the requested data.
  • Click “Export” at the top right of the page.
  • Name your report, select your preferred format (CSV, PNG, XLS or XLSX), and click “Export”.

Now you have all the information available for multiple ad accounts, and you can analyze it collectively.

How to import Facebook Ads data to Google Sheets 

You can easily import a downloaded CSV or Excel file with your ad data into Google Sheets. All you have to do is open a Google Sheets document, go to File => Import, and upload the exported Facebook Ads file. For more on this, read How to manually import CSV data into Google Sheets from your device.

Here is how the exported ads data will look in Google Sheets:

This did not take much time, but the issue is that you have to repeat these steps manually every time. So, let’s check out how you can automate the import of Facebook Ads to Google Sheets.

How to integrate Facebook Ads and Google Sheets for automatic data export

To set up a Facebook Ads connection to Google Sheets, you’ll need to complete two high-level steps:

  • Get a Facebook API access token
  • Connect Facebook Ads to Google Sheets

How to get a Facebook API access token 

Step 1: Create a Facebook App

Log in to your Facebook account. Go to and select My Apps.

Click Create App and select Business. This type is for apps that allow you to manage Ads and ad-related assets. Click Continue.

In the open window, fill out the following fields:

  • App Display Name – enter the name you like
  • App Contact Email – specify the contact email address
  • App Purpose – select whether the app will access data from Facebook’s Platform on behalf of yourself (your business) or clients.
  • Do you have a Business Manager account? – select your business manager account from the dropdown list.

Click the Create App button and complete the Security Check.

Note: Use another browser or device to create an app if your security check window looks like this:

Step 2: Generate an Access Token

Once the app is created, you’ll be taken to the App Dashboard. Now go to Tools => Graph API Explorer.

Select the following parameters:

  • Facebook App – choose your created app
  • User or Page – choose Get User Access Token
  • Add a Permission – add ads_read permission (you’ll find it in Events Groups Pages) and other permissions you may need

Click Generate Access Token to link your app to Facebook and obtain the API token. Here is how it may look:


Warning: By default, the access token only lasts for one hour! 

How to extend the Facebook API access token

  • Click on the blue icon located next to the token, then click Open in Access Token Tool.
  • Click Extend Access Token and enter your Facebook password to confirm your intent.
  • Welcome a long-lived access token that will expire in 2 months.
  • Click Debug => This will get you back to the Access Token Debugger where you can copy your access token.

Connect Facebook Ads to Google Sheets will help you bring your Facebook Ads data to Google Sheets. It is a solution for importing data to Sheets from different sources including apps (Airtable, Pipedrive, etc.) and online published files (CSV, Excel). Check out the list of available Google Sheets integrations does not provide a ready-to-use Facebook Ads-Google Sheets integration yet, so we’ll set up a custom one using JSON Client importer that lets you connect to third-party apps using their APIs.

Let’s check out the setup flow for a real-life example: when you need to import summary data for your Facebook Ads account. 

Set up a Facebook Ads Google Sheets integration to import summary for your account

Sign in to, click +Add New Importer, name it what you like, and complete three steps:

  • Set up source
  • Set up destination
  • Set up schedule

Set up source

  • Select JSON Client as the source application from the dropdown list. Click Continue.
  • Enter the JSON URL – a request URL to Facebook API in the following format:{api-version}/{node}/{edge}
  • {api-version}v11.0 is the latest API version as of this article. You can learn the API version in the Access Token Debugger.
  • {node} – nodes are individual objects, each with a unique ID. They represent the categories of data you can get. Here are the main root nodes for Facebook Marketing API:
NodeData entity
/{user}Data related to a specific user.
/act_{your-account-id}Data related to the business entity managing ads.
/{campaign-id}Data related to a specific ad campaign – contains one or more ad sets.
/{ad-set-id}Data related to a specific ad set – all ads that share the same budget, schedule, bid, and targeting.
/{ad-id}Data related to a specific ad.
  • {edge} – each node has its specific edge to return the requested data. For example, the node /{campaign-id} has the edge /ads, which returns data about creative elements and measurement information for an ad. Here is a list of node-specific edges you can use for data export.

Here is a JSON URL example for exporting summary data for a Facebook Ads account:

You can find the ID of your account in the Ads Manager in the dropdown field. You can also copy the account ID from the URL bar. 

Once you’ve specified the JSON URL, click Continue.

  • In the URL query string field, you’ll need to specify the query string attached with the access token as follows:
access_token: {your-access-token}

Another important parameter is fields – when you query a node, it returns a default set of fields, one or a few, but not all of them. Use the fields parameter and list each field separated with commas.

In our example, we’ve specified the following fields:

fields: account_id,account_name,campaign_id,campaign_name,adset_id,adset_name,ad_id,ad_name,account_currency,reach,impressions,clicks,cpc,spend

Note: You can learn the fields available to the node and edge you’re exporting in the Facebook Marketing API Reference. You can also add metadata:1 into the URL query string field when requesting a node (without an edge). This will return a list of fields available for the specified node.

In addition to access_token and fields, you can benefit from other URL query parameters:

  • level – you can specify the level or result: ad, adset, campaign, account.
  • limit – you can specify the number of rows to return. By default, the limit is 25 rows.
  • sort – you can specify a field to sort the result, as well as ascending or descending direction. By default, the sorting direction is ascending.
  • time_range: {'since':YYYY-MM-DD,'until':YYYY-MM-DD} – you can specify a time range.
  • date_preset – you can specify a relative time range, such as today, yesterday, this_month, and so on. The default value is last_30d.
  • time_increment – you can specify a time slice for your results: monthly, all_days or via an integer, such as 1 (per each day), 3 (per each 3 days), etc. This parameter is ignored if the time_ranges parameter is specified.
  • and many more.

In our example, the URL query string field looks like this:

access_token: {acces-token}
fields: account_id,account_name,campaign_id,campaign_name,adset_id,adset_name,ad_id,ad_name,account_currency,reach,impressions,clicks,cpc,spend
time_increment: 1
level: account
date_preset: this_year
sort: spend
limit: 1000

Check out the details of query parameters and fields for insights in the Facebook API documentation.

Click Proceed to Destination Settings.

Set up destination

Select or add your destination Google account, click Continue, and select a spreadsheet, as well as the sheet to import Facebook Ads data to.

Click Proceed to Schedule Settings.

Set up schedule

You can automate the Facebook Ads data import on a custom schedule. To do this, toggle on Automatic data refresh and configure the schedule you want:

  • Interval – every hour, day or month
  • Days of week
  • Time preferences
  • Time zone

When you’re ready, click Save And Run to import your data. Once the import is completed, you can see the imported Facebook ads data. For this, click the View Results button and the destination spreadsheet will open in a new tab of your browser.

Can I export Facebook Lead Ads to Google Sheets using JSON Client?

Unfortunately, you can’t do this. Facebook Lead Ads data contains personal information and requires pages_manage_ads or leads_retrieval permission for your FB app. To obtain permission, your app should meet a number of requirements specified in Facebook regulatory documentation. 

However, you can still download Facebook Lead Ads manually from Ads Manager or your Facebook Page as a CSV or Excel file. We recommend you download the file from the Ads Manager since it’s a shorter way. 

Select the ad for which you want to export leads data and click On-Facebook Lead (in the Results column).

Then select a date range and click Download. In the next window, you’ll need to click on the file format you want to download – CSV or XLS.

Nodes and edges for the Facebook Ads API to import data to Google Sheets

Node: /{user}

EdgeData entity
/adaccountgroupsGroup of Ad accounts associated with the user
/adaccountsAll Ad accounts associated with the user
/accountsAll pages and places that someone is an admin of
/promotable_eventsAll promotable events or promotable page events that belong to pages the use is an admin of
/promotable_domainsAll domains the user can promote

Node: /act_{your-account-id}

EdgeData entity
/campaignsData about campaigns’ objective and Ad sets
/adsetsData about Ads that share the same budget, schedule, bid, and targeting
/adsData for an Ad, such as creative elements and measurement information
/adcreativesAd’s appearance and content
/adimagesLibrary of images to use in Ad creatives
/advideosLibrary of videos to use in Ad creatives
/activitiesLog of actions taken on the Ad account
/adtagsSet of tags in the Ad account
/adcampaignconversionsConversion data aggregated by Ad sets
/adgroupconversionsConversion data aggregated by Ads
/customaudiencesCustom audiences
/generatepreviewsTo generate preview of an Ad
/offsitepixelsPixels associated with the account
/reachestimateTo generate the estimated reach of an Ad with a given targeting spec
/reportstatsAd account data 
/adcampaignstatsSet of statistics aggregated by Ad sets 
/adgroupstatsSet of statistics aggregated by Ads
/targetingsentencelinesTo generate human-readable description of targeting for the Ad set
/usersList of people associated with the account
/insightsData across child objects

Node: /{campaign-id}

EdgeData entity
/adsetsAds that share the same budget, schedule, bid, and targeting
/adsData necessary for an Ad
/adtagsTags for your campaigns
/insightsData across child objects

Node: /{ad-set-id}

EdgeData entity
/adsData necessary for an Ad
/adcreativesAd’s content and appearance
/activitiesLog of actions taken on the Ad set
/adtagsTags for your Ad sets
/conversionsConversion data for the Ad set
/insightsData across child objects

Node: /{ad-id}

EdgeData entity
/adcreativesAd’s content and appearance
/adtagsTags for your Ads
/conversionsConversion data for the Ad
/keywordstatsStats per targeted keyword for the Ad
/previewsTo generate Ad previews from the existing Ad
/reachestimateEstimated reach for the Ad
/targetingsentencelinesDescription of the targeting for the Ad
/insightsData across child objects

Do you need a Facebook Ads Google Sheets integration?

What is good about JSON Client by is that it lets you connect to different APIs and get data to Google Sheets without coding. However, not every user wants to tinker with the API documentation to get their job done. Besides, getting Facebook Lead Ads directly to Google Sheets may also be a wanted functionality. 

If you are one of those users and you’d like to have a Facebook Ads to Google Sheets integration or maybe even export Google Ads to your spreadsheet, tell us about it by filling out this form. If it gets enough votes, we’ll develop a ready-to-use importer just like Shopify or Pipedrive. Good luck with your data!

Back to Blog

Comments are closed.

Access your data
in a simple format for free!

Start Free