Skip to main content

Google Data Studio connector for Airtable


Forum|alt.badge.img+3

Hey Airtable team, have you come across Google Data Studio? It’s a free tool that is excellent for visualising data and creating BI dashboards - a perfect companion to Airtable.

Google Data Studio has ‘community connectors’ that allow users to pipe in data from third party services such as yourselves. I’m trying my hand at building a private connector for one of my bases at the moment, and it’s not too tricky.

So, my request is for you folks to build a public ‘community connector’ that anyone could use to connect their Airtable data to Google Data Studio! More info here: https://developers.google.com/datastudio/connector/developer-launch/

33 replies

Forum|alt.badge.img+3
  • Author
  • Participating Frequently
  • 7 replies
  • October 16, 2017

Could also be an easy solution to this request: Ability to create graphs, charts, maps from data in Airtable database


Forum|alt.badge.img+4
  • Known Participant
  • 63 replies
  • October 18, 2017

You could use Railsware’s Airtable Importer to get your data into a Google Sheet:

https://railsware.com/case-studies/airtable-importer/

Then just use the Google Sheet as a source for Data Studio.


Forum|alt.badge.img+3
  • Author
  • Participating Frequently
  • 7 replies
  • October 19, 2017

Thanks Matt, that importer is awesome! I’m having trouble refreshing data with the Railsware add-on though, given the volume of tables syncing to different spreadsheet tabs. Appreciate your suggestion :slightly_smiling_face:


  • New Participant
  • 3 replies
  • November 4, 2018
Matt_Sayward wrote:

You could use Railsware’s Airtable Importer to get your data into a Google Sheet:

https://railsware.com/case-studies/airtable-importer/

Then just use the Google Sheet as a source for Data Studio.


I tried this but if you use more than one table is has been problematic for me. As I recall, linked fields show as reference IDs instead if the linked values. Seems like I had a few cases were the IDs translated to the linked value. Perhaps its a look up field that translates while table links do not.


  • New Participant
  • 3 replies
  • November 4, 2018

This would be a great integration! i am curious how your private connector works and how yo did it.


  • Participating Frequently
  • 8 replies
  • January 11, 2019
Ron_Majors wrote:

This would be a great integration! i am curious how your private connector works and how yo did it.


How it works: the connector queries the Airtable API regularly, one table at a time, to keep it up to date.

How I did it: searched through this forum for various code snippets, and hacked them together until I got something working. Happy to share the results if it’s helpful.


  • New Participant
  • 3 replies
  • January 11, 2019
Optimi wrote:

How it works: the connector queries the Airtable API regularly, one table at a time, to keep it up to date.

How I did it: searched through this forum for various code snippets, and hacked them together until I got something working. Happy to share the results if it’s helpful.


Sounds like that would be more helpful.


  • New Participant
  • 1 reply
  • January 20, 2019

It will be very usefull feature !


  • Participating Frequently
  • 8 replies
  • January 20, 2019
Ron_Majors wrote:

Sounds like that would be more helpful.


Here’s the function for querying the Airtable API. Instead of using the function name below, you’d call this getData() as mentioned on https://developers.google.com/datastudio/connector/build

function fetchDataFromAirtable(tableName, viewID) {
  
  // Initialize the offset.
  var offset = 0;

  // Initialize the result set.		
  var records = [];

  // Make calls to Airtable, until all of the data has been retrieved...
  while (offset !== null){	

    // Specify the URL to call.
    var url = [
      "https://api.airtable.com/v0/", 
      baseID, 
      "/",
      encodeURIComponent(tableName),
      "?",
      "api_key=", 
      api_key,
      "&view=",
      viewID,
      "&offset=",
      offset
      ].join('');
    var options =
        {
          "method"  : "GET"
        };
    
    //call the URL and add results to to our result set
    response = JSON.parse(UrlFetchApp.fetch(url,options));
    records.push.apply(records, response.records);
    
    //wait for a bit so we don't get rate limited by Airtable
    Utilities.sleep(201);

    // Adjust the offset.
	// Airtable returns NULL when the final batch of records has been returned.
    if (response.offset){
      offset = response.offset;
    } else {
      offset = null;
    }
      
  }
  return records;
}

Forum|alt.badge.img
  • New Participant
  • 3 replies
  • January 20, 2019
Optimi wrote:

Here’s the function for querying the Airtable API. Instead of using the function name below, you’d call this getData() as mentioned on https://developers.google.com/datastudio/connector/build

function fetchDataFromAirtable(tableName, viewID) {
  
  // Initialize the offset.
  var offset = 0;

  // Initialize the result set.		
  var records = [];

  // Make calls to Airtable, until all of the data has been retrieved...
  while (offset !== null){	

    // Specify the URL to call.
    var url = [
      "https://api.airtable.com/v0/", 
      baseID, 
      "/",
      encodeURIComponent(tableName),
      "?",
      "api_key=", 
      api_key,
      "&view=",
      viewID,
      "&offset=",
      offset
      ].join('');
    var options =
        {
          "method"  : "GET"
        };
    
    //call the URL and add results to to our result set
    response = JSON.parse(UrlFetchApp.fetch(url,options));
    records.push.apply(records, response.records);
    
    //wait for a bit so we don't get rate limited by Airtable
    Utilities.sleep(201);

    // Adjust the offset.
	// Airtable returns NULL when the final batch of records has been returned.
    if (response.offset){
      offset = response.offset;
    } else {
      offset = null;
    }
      
  }
  return records;
}

Excellent. Thank you.


Optimi wrote:

Here’s the function for querying the Airtable API. Instead of using the function name below, you’d call this getData() as mentioned on https://developers.google.com/datastudio/connector/build

function fetchDataFromAirtable(tableName, viewID) {
  
  // Initialize the offset.
  var offset = 0;

  // Initialize the result set.		
  var records = [];

  // Make calls to Airtable, until all of the data has been retrieved...
  while (offset !== null){	

    // Specify the URL to call.
    var url = [
      "https://api.airtable.com/v0/", 
      baseID, 
      "/",
      encodeURIComponent(tableName),
      "?",
      "api_key=", 
      api_key,
      "&view=",
      viewID,
      "&offset=",
      offset
      ].join('');
    var options =
        {
          "method"  : "GET"
        };
    
    //call the URL and add results to to our result set
    response = JSON.parse(UrlFetchApp.fetch(url,options));
    records.push.apply(records, response.records);
    
    //wait for a bit so we don't get rate limited by Airtable
    Utilities.sleep(201);

    // Adjust the offset.
	// Airtable returns NULL when the final batch of records has been returned.
    if (response.offset){
      offset = response.offset;
    } else {
      offset = null;
    }
      
  }
  return records;
}

Hi Optimi
Thanks for this great contribution. But how can I use it as connector in DataStudio? I have to create it then publish it? How?
Sorry for this noob question.
Laurent


Forum|alt.badge.img+3
  • Author
  • Participating Frequently
  • 7 replies
  • March 5, 2019
Laurent_Tourneu wrote:

Hi Optimi
Thanks for this great contribution. But how can I use it as connector in DataStudio? I have to create it then publish it? How?
Sorry for this noob question.
Laurent


Pleasure, hope it’s useful! Pretty sure you can write the code as a Google Apps Script project, and then start using it in data studio without having to publish anything. This page explains a little more: https://developers.google.com/datastudio/connector/use


Rupert_Snook wrote:

Pleasure, hope it’s useful! Pretty sure you can write the code as a Google Apps Script project, and then start using it in data studio without having to publish anything. This page explains a little more: https://developers.google.com/datastudio/connector/use


Thanks.
But unfortunately, still getting an error message, as this connector is not autorised.


Forum|alt.badge.img+3
  • Author
  • Participating Frequently
  • 7 replies
  • March 12, 2019
Laurent_Tourneu wrote:

Thanks.
But unfortunately, still getting an error message, as this connector is not autorised.


Oh no! I’ll look into this if I get time - and if you figure out the solution please post it here :slightly_smiling_face:


  • Participating Frequently
  • 8 replies
  • May 11, 2019

Folks, we’ve published a recipe on how to connect Airtable to Google Data Studio, using Google Sheets as an intermediary:

cc @Laurent_Tourneux @Ron_Majors You might find this easier than making your own Data Studio connector :slightly_smiling_face:


  • Participating Frequently
  • 9 replies
  • October 22, 2019

So amazing! Much gratitude on this one.


  • Participating Frequently
  • 6 replies
  • March 14, 2020
Optimi wrote:

Here’s the function for querying the Airtable API. Instead of using the function name below, you’d call this getData() as mentioned on https://developers.google.com/datastudio/connector/build

function fetchDataFromAirtable(tableName, viewID) {
  
  // Initialize the offset.
  var offset = 0;

  // Initialize the result set.		
  var records = [];

  // Make calls to Airtable, until all of the data has been retrieved...
  while (offset !== null){	

    // Specify the URL to call.
    var url = [
      "https://api.airtable.com/v0/", 
      baseID, 
      "/",
      encodeURIComponent(tableName),
      "?",
      "api_key=", 
      api_key,
      "&view=",
      viewID,
      "&offset=",
      offset
      ].join('');
    var options =
        {
          "method"  : "GET"
        };
    
    //call the URL and add results to to our result set
    response = JSON.parse(UrlFetchApp.fetch(url,options));
    records.push.apply(records, response.records);
    
    //wait for a bit so we don't get rate limited by Airtable
    Utilities.sleep(201);

    // Adjust the offset.
	// Airtable returns NULL when the final batch of records has been returned.
    if (response.offset){
      offset = response.offset;
    } else {
      offset = null;
    }
      
  }
  return records;
}

Same problem here… =(


This feature request is essential. +1


  • New Participant
  • 2 replies
  • April 21, 2020
Optimi wrote:

Here’s the function for querying the Airtable API. Instead of using the function name below, you’d call this getData() as mentioned on https://developers.google.com/datastudio/connector/build

function fetchDataFromAirtable(tableName, viewID) {
  
  // Initialize the offset.
  var offset = 0;

  // Initialize the result set.		
  var records = [];

  // Make calls to Airtable, until all of the data has been retrieved...
  while (offset !== null){	

    // Specify the URL to call.
    var url = [
      "https://api.airtable.com/v0/", 
      baseID, 
      "/",
      encodeURIComponent(tableName),
      "?",
      "api_key=", 
      api_key,
      "&view=",
      viewID,
      "&offset=",
      offset
      ].join('');
    var options =
        {
          "method"  : "GET"
        };
    
    //call the URL and add results to to our result set
    response = JSON.parse(UrlFetchApp.fetch(url,options));
    records.push.apply(records, response.records);
    
    //wait for a bit so we don't get rate limited by Airtable
    Utilities.sleep(201);

    // Adjust the offset.
	// Airtable returns NULL when the final batch of records has been returned.
    if (response.offset){
      offset = response.offset;
    } else {
      offset = null;
    }
      
  }
  return records;
}

Hey Rupert, thanks for putting this here. I’m trying to get this whole thing as a connector running. do you have the code for the other functions (config, schema) etc. available as well?

Best


  • New Participant
  • 1 reply
  • May 11, 2020

What is the CURRENT, BEST WAY to sync data REAL TIME, AUTOMATICALLY from AT to Data Studio. These forums are always super dated and incomplete and cobbled together. Would be nice to NOT have to parse through all the out-dated methods if there are NEW ways to do things. Are we still farting around setting up a sync to Sheets or is there a better mousetrap?? Please advise most recent methods. Thanks. :slightly_smiling_face:


  • New Participant
  • 4 replies
  • June 11, 2020

Hi everyone. I had this problem too. But I searched for some add-on to connect Airtable to Google Sheets, and I found that one: https://gsuite.google.com/u/0/marketplace/app/couplerio/532272210531?hl=pt&pann=sheets_addon_widget

It allowed me to connect many bases (even from different workplaces) in a single Google Sheet that can be used at Data Studio.

The most funny part is that this add-on refresh all the data automatically and replace the information, instead to create a new row.

Some images:

Another point: it’s for free, but it has limits.

You can create 1000 imports per month and 50.000 rows per month. Every month, it resets.

But, to be honest, it’s a lot of imports and rows per month.

I hope it helps you, guys!


  • New Participant
  • 1 reply
  • November 6, 2020
Optimi wrote:

Folks, we’ve published a recipe on how to connect Airtable to Google Data Studio, using Google Sheets as an intermediary:

cc @Laurent_Tourneux @Ron_Majors You might find this easier than making your own Data Studio connector :slightly_smiling_face:


This is very helpful!! Thank you so much


Forum|alt.badge.img+15

Hey Everyone,

I wanted to let you all know about an easier way to connect Airtable to Google Data Studio - Sync Inc (syncinc.so).

With a couple clicks, we’ll setup a hosted Postgres follower database containing all your Airtable data. We keep your database in sync in real-time. All you have to do is connect your Sync Inc database to Google Data Studio with the standard Postgres connector.

As we all know, Google Data Studio has first class support for PostgreSQL. By turning your Airtable base into a Postgres database, you can plug you Airtable data into GDS in not time.

If you’re curious about how it all works, check out our docs: https://docs.syncinc.so/


  • New Participant
  • 1 reply
  • May 27, 2021

Yes it is an excellent tool to organize marketing data , NOW everyone can utilize the best tool provided by Google . Computerize gathering all promoting information and limit time spent on getting ready and organizing. Optimize ROI by looking at the whole customer Journey . If you are not aware of this tool and really dont know how to implement then you can visit this url , which explain you everything https://www.windsor.ai/best-google-data-studio-connectors/


manas wrote:

Yes it is an excellent tool to organize marketing data , NOW everyone can utilize the best tool provided by Google . Computerize gathering all promoting information and limit time spent on getting ready and organizing. Optimize ROI by looking at the whole customer Journey . If you are not aware of this tool and really dont know how to implement then you can visit this url , which explain you everything https://www.windsor.ai/best-google-data-studio-connectors/


if you want to get in depth information then please visit the website https://datastudio.google.com/

here you will get all relevant information from scratch to implementation

thanks to google once again.


Reply