How to Connect Appfigures to Google Sheets
At the moment, there's no native connector to get data from Appfigures into Google Sheets, but that doesn't mean you can't connect the two!
You'll be able to do that with Google's Script Engine and a custom script.
Here's how to do that:
- Open your Google Sheet. A new one is best but not necessary.
- Open the script editor by navigating to
Extensions
→Apps Script
- Give the script a name in the left menu by clicking three dots of
Code.gs
then rename.AF API
is a good default. - Copy the following script, as-is, into the editor
- Set your access token. Click here to learn how to generate it
- Customize (optional):
- Days - The number of days you want pulled every time you load data. The default is 7.
- Grouping - How the data will be broken down. Options include
date
,country
,storefront
, andproduct
. Multiple options can be specified, separated by a comma. By default, data will be grouped by date. - Products - The Product Ids of the apps you want to pull data for. By default (blank) all apps will be included.
- Mode - How to introduce new data into the sheet. Options:
append
,overwrite
.
- Save the project.
- Select the
createMenu
function from the top dropdown and hit "Run" to set things up. This one's important.
- Head back to your Google Sheet and you'll see a new
Appfigures
option in your menu. All you have to do now is select the data you want to bring into your Google Sheet and vóila!
Tinkering further
This is a pretty simple and generic way to pull data from the Appfigures API into Google Sheets. It can be further customized and other data sets can be added to it as well beyond the ones available in this script.
Check out the API docs to see what the API can do.