fredericharnois / facebook-ads-reporting-google-apps-script

This script pushes Facebook Ads data to Google Sheets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exporting Facebook Ads data to Google Sheets

This script was built to export Facebook Ads data to Google Sheets on a recurring basis for use in a dashboard.

In order to bypass limits around the amount of data that can be processed by the Facebook Marketing API and Google App Script's 6 minute runtime maximum, the script makes asynchronous requests to the Facebook Marketing API.

Setup

You'll first want to create a Facebook App and add the Marketing API product to it.

You can then get a short-lived user access token through the Graph API Explorer.

If you're going to be using this script on an ongoing basis, I recommend you exchange your short-lived token for a long-lived one using this method.

Once you've entered your credentials as well as all parameters, you'll want to make sure that request-facebook-report.js is scheduled to run before get-facebook-report.js.

About

This script pushes Facebook Ads data to Google Sheets.

License:MIT License


Languages

Language:JavaScript 100.0%