Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Google Data Studio connector for Airtable

cancel
Showing results for 
Search instead for 
Did you mean: 
Rupert_Snook
5 - Automation Enthusiast
5 - Automation Enthusiast

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 Comments
Rupert_Snook
5 - Automation Enthusiast
5 - Automation Enthusiast

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

Matt_Sayward
8 - Airtable Astronomer
8 - Airtable Astronomer

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.

Rupert_Snook
5 - Automation Enthusiast
5 - Automation Enthusiast

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:

Ron_Majors
4 - Data Explorer
4 - Data Explorer

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.

Ron_Majors
4 - Data Explorer
4 - Data Explorer

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

Optimi
5 - Automation Enthusiast
5 - Automation Enthusiast

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.

Ron_Majors
4 - Data Explorer
4 - Data Explorer

Sounds like that would be more helpful.

arik_tul
4 - Data Explorer
4 - Data Explorer

It will be very usefull feature !

Optimi
5 - Automation Enthusiast
5 - Automation Enthusiast

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;
}
Ron_Majiros
5 - Automation Enthusiast
5 - Automation Enthusiast

Excellent. Thank you.