Today, most organizations are facing the problem of not being “organized”. Poor organization is one of the factors that can hinder business focus. It causes poor communication among organizational teams and sporadic thinking. The end result of this is low morale and low productivity. The goal of Airtable is to solve this problem. Airtable facilitates collaboration among users in an organization. 

When using Airtable, you will want to extract insights from the generated data. One of the ways to do this is by visualizing the data. However, Airtable is not a good tool for data visualization. You need to move data from Airtable to another tool like Tableau and visualize it. This way, you’ll be able to extract insights from the data for proper decision-making. In this article, you will learn about Airtable and the procedure to set up your Airtable Tableau Integration. 

Leveraging Hevo to Deliver Quality Data for Analytics

Hevo simplifies data analytics by automating the process of extracting, transforming, and loading (ETL) data from multiple sources into cloud-based platforms for analysis. 

What Hevo Offers?

  1. Fully Managed: Hevo Data is a fully managed service and is straightforward to set up.
  2. Schema Management: Hevo Data automatically maps the source schema to perform analysis without worrying about the changing schema.
  3. Real-Time: Hevo Data works on the batch as well as real-time data transfer so that your data is analysis-ready always.

Transform your data with Hevo—seamless, automated, and reliable!

Get Started with Hevo for Free

Introduction to Airtable

Airtable Logo - Airtable Tableau

Airtable is an online database that a group of collaborators can use to store, share, and edit information. The information, in this case, can be inventory, ideas, tasks, etc. 

It’s true that you can put information about a project on an online spreadsheet like Google Sheets and share it with others for viewing and editing. The spreadsheet can contain basic information like names of people and their contact information, or sensitive information like financial accounting data. 

Airtable is similar to such spreadsheets, but it comes with two major differences. First, with Airtable, you can manage databases instead of sheets. The major difference between databases and spreadsheets is that databases are a bit complex. Secondly, Airtable is a user-friendly tool, hence, you must not be an expert in using Excel to use Airtable.

See Airtable as an online platform where a group of people can collaborate on creating and editing databases. It comes with many templates that can guide you on how to use the system. 

Pre-Requisites for Airtable Tableau Integration

This is what you need for this article:

  • Airtable Account. 
  • Tableau Desktop/Tableau Server/Tableau Online. 

Procedure to Implement Airtable Tableau Integration

Method 1: Airtable Tableau Integration using Google Sheets

There is no direct way of integrating Airtable and Tableau manually. However, you can use Google sheets as an intermediary to transfer data between the two platforms. You can sync your Airtable account to Google Sheets and move your Airtable Data to Google Sheets. 

You can then move data from Google Sheets into Tableau for visualization. Let us demonstrate these two processes:

Airtable Tableau Integration Part 1: Syncing Airtable to Google Sheets

Follow the steps given below:

Step 1: Create a Google Sheets template

First, sign into your Google account. Create a new spreadsheet to hold data from your Airtable base. 

Give the spreadsheet a name that makes sense to you. 

Step 2: Add the Tables to be copied from Airtable

Open the Airtable base that you need to copy data from. Select the table whose data is to be visualized. Click the “VIEWS” icon located at the top right corner of the window. 

View window in Airtable - Airtable Tableau

Copy the URL of the view which closely resembles something like this:

https://airtable.com/tblf2OjtW3FwYb10j/viwZHOHKL7I2b611N?blocks=hide

In the above case, the Airtable View ID is the part that starts with “view” and ends before the “?”. In the above case, it is viwZHOHKL7I2b611N

Step 3: Add Code to your Spreadsheet

On your Spreadsheet, click the “Tools” button from the top and select “Script editor”. 

Script Editor in Google Sheets - Airtable Tableau

This will open the script editor window. Delete the default code from it. 

We can then write some script that can be used to sync data between Airtable and Google Sheets. Here is the code:

var api_key = "keyXXXXXXXXXXXX"; //ADD YOUR AIRTABLE API KEY  HERE
var baseID = "appXXXXXXXXXXXX"; //ADD YOUR BASE ID HERE
var tablesToSync_fromSheetRange = "A2:B6"; //UPDATE TABLE CELL RANGE HERE (for the tables to be synced)

////////// create UI menu items///////////
function onOpen(e) {
   SpreadsheetApp.getUi()
       .createMenu('Sync Airtable to Google Sheets')
       .addItem('Sync all data manually', 'syncData')
       .addToUi();
 }

////////// The function that will trigger the data syncing process ///////////

function syncData(){
  //fetch table names from the control panel of the spreadsheet
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var tablesToSync = ss.getSheetByName("Control panel").getRange(tablesToSync_fromSheetRange).getValues();
    
  //sync all tables
  for (var i = 0; i<tablesToSync.length; i++){
    var tableName = tablesToSync[i][0];
    var viewID = tablesToSync[i][1];
    var airtableData = fetchDataFromAirtable(tableName, viewID);
    pasteDataToSheet(tableName, airtableData);
    
    //wait for some time so that Airtable doesn't limit the rate
    Utilities.sleep(201);
  }
}

/////////////////////////////

function saveFormulas(dataSheets){
  //add control panel to the data-related sheets
  dataSheets.push("Control panel");
  
  //initialise the object to hold the formulas
  var formulas = {};
  
  //get all sheets in spreadsheet
  var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();
  
  //iterate over the sheets 
  for (var i in sheets){
    var sheetName = sheets[i].getSheetName();
    if (dataSheets.indexOf(sheetName) == -1){
      formulas[sheetName] = sheets[i].getRange("A:Z").getFormulas();
    }
  }
  return formulas;
}

////////// paste airtable data into a sheet ///////////////////////////

function pasteDataToSheet(sheetName, airtableData){
  
  //define the field schema
  var fieldNames = ["Record ID"];
  for (var i = 0; i<airtableData.length; i++){
    for (var field in airtableData[i].fields){
      fieldNames.push(field);
    }
  }
  //remove duplicates from the field names array
  fieldNames = fieldNames.filter(function(item, pos){
    return fieldNames.indexOf(item)== pos;
  });
  
  //select the sheet to be updated, or create new one if it doesn't exist 
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet; 
  if (ss.getSheetByName(sheetName) == null){
    sheet = ss.insertSheet(sheetName);
  } else {
    sheet = ss.getSheetByName(sheetName);
  }

  //clear the sheet data 
  sheet.clear();
  
  //add the field names to the sheet as row headers, then format the headers
  var headerRow = sheet.getRange(1,1,1,fieldNames.length);
  headerRow.setValues([fieldNames]).setFontWeight("bold").setWrap(true);
  sheet.setFrozenRows(1);
  
  //add the Airtable record IDs to the first column of every row
  for (var i = 0; i<airtableData.length; i++){
    sheet.getRange(i+2,1).setValue(airtableData[i].id);
  }
  
  //// add the other data to the rows ////
  //for every record in the Airtable data...
  for (var i = 0; i<airtableData.length; i++){
    //iterate over every field in the record
    for (var field in airtableData[i].fields){
      sheet.getRange(i+2,fieldNames.indexOf(field)+1) //find the cell to be updated
        .setValue(airtableData[i].fields[field]); //update the cell 
    }
  }  
}

////////////// query Airtable API to obtain raw data ///////////////////////

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

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

  // Make calls to Airtable to retrieve all the data...
  while (offset !== null){  

    // Specify the URL to be called.
    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.
    if (response.offset){
      offset = response.offset;
    } else {
      offset = null;
    }
      
  }
  return records;
}

////////////////////////////////////

Copy the above code and paste it into the script editor window. You can get the Airtable API key from the account page of your Airtable account here.

Click “Generate API Key” to generate it. 

Generating Airtable API key - Airtable Tableau

Next, you should find the base ID for the base that you need to use. Open the Airtable API page which can be found .

Click the base that you will want to use. Copy the API key from that page and paste it into the right place in your code. The API key has the pattern app…

Save the script and reload the spreadsheet. 

If everything worked okay, you should see a new menu named “Sync Airtable to Google Sheets”. 

Syncing Airtable to Goggle Sheets - Airtable Tableau

Click the new menu then select “Sync all data manually”. 

If asked to to give the script permission, do so. You should see the Airtable table begin to come through. 

Airtable Tableau Integration Part 2: Connect Tableau And Google Sheets

Now that the Airtable data is in Google Sheets, you can pull it from there into Tableau. Follow the steps given below:

Step 1: Open Tableau, click “Connect” and then select “Google Sheets”. 

Step 2: Sign into your Google Sheets account using your Google account credentials. 

Step 3: Click “Allow” to give Tableau access to your Google Sheets. 

Step 4: Select the Google Sheets that you need Tableau to connect to, then click the “Connect” button. 

Congratulations!

You’ll have connected Tableau to Google Sheets and pulled data from Airtable into Tableau. 

Limitations of Airtable Tableau Integration using Google Sheets

The following are the challenges of integrating Airtable and Tableau:

  1. There is no direct way to integrate Airtable and Tableau. One has to use Google Sheets as the intermediary. 
  2. The process of integrating Airtable and Tableau is lengthy. One may take a long time to sync data between the two platforms. 
  3. Coding knowledge is required. This makes it difficult for individuals without coding knowledge and companies with no skilled technical team. 
  4. It’s impossible to pull data from Airtable into Tableau in real-time.

igning up for a 14-day free trial today.

Conclusion

In this article, you explored the features of Airtable and the steps involved in setting up an Airtable-Tableau integration. You also learned about the limitations of the manual integration method, including potential challenges in real-time data syncing and scalability. 

While Airtable excels in organizing and managing data, Tableau brings powerful data visualization capabilities. Together, they provide a comprehensive solution for both data management and insightful reporting, though it’s important to consider the best integration approach to maximize efficiency and overcome the inherent limitations.

You can try Hevo’s 14-day free trial. You can also have a look at the unbeatable pricing that will help you choose the right plan for your business needs!

FAQs

1. Does Tableau work with Airtable?

Yes, Tableau can integrate with Airtable through its native connectors or third-party tools like Zapier, making it possible to visualize data stored in Airtable within Tableau.

2. Is Airtable similar to Tableau?

No, Airtable is a cloud-based collaboration tool that combines features of spreadsheets and databases, while Tableau is a data visualization tool used to create interactive reports and dashboards from various data sources.

3. What is the use of Airtable?

Airtable is used for organizing, managing, and collaborating on data through customizable spreadsheets and database-like features, making it suitable for project management, content planning, and tracking workflows.

Nicholas Samuel
Technical Content Writer, Hevo Data

Nicholas Samuel is a technical writing specialist with a passion for data, having more than 14+ years of experience in the field. With his skills in data analysis, data visualization, and business intelligence, he has delivered over 200 blogs. In his early years as a systems software developer at Airtel Kenya, he developed applications, using Java, Android platform, and web applications with PHP. He also performed Oracle database backups, recovery operations, and performance tuning. Nicholas was also involved in projects that demanded in-depth knowledge of Unix system administration, specifically with HP-UX servers. Through his writing, he intends to share the hands-on experience he gained to make the lives of data practitioners better.