Search API Connector Documentation

Print

Import Airtable Data to Google Sheets

This guide will walk through how to pull data from the Airtable API directly into Google Sheets, using the API Connector add-on for Sheets. We’ll first get an API key from Airtable, and then set up a request to pull in Airtable API data to your spreadsheet.

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get your Airtable API Key

  1. While logged into Airtable, click the Account icon in the top right corner.
    airtable-img1
  2. Scroll down the page and click Generate API Key:
    airtable-img2
  3. An API key will appear. That’s it! Copy this and keep it safe, we’ll need it shortly.
    airtable-img3

Part 2: Create your API Request URL

  1. Start by navigating to https://airtable.com/api to find the access details for your bases. Airtable creates separate APIs for each base, so click your base of interest to find your access details:
    airtable-img4
  2. Once you click in to your base, you’ll see your API URL details displayed in the documentation, like this:
    airtable-img11
  3. These URLs will be customized for your specific base, so just copy the URL you want to your clipboard. It should look something like this:
    https://api.airtable.com/v0/appd80HFp4KuBLNQY/Dishes

Part 3: Pull Airtable API Data into Sheets

We can now enter all our values into API Connector and import Airtable data into Google Sheets.

  1. Open up Google Sheets and click Add-ons > API Connector > Open.
  2. In the Create tab, enter the Request URL we just created
    airtable-img5
  3. Under Headers, enter Authorization as your Key, and Bearer YOUR_API_KEY as the value:
    airtable-img6
  4. Create a new tab and click ‘Set current’ to use that tab as your data destination.
  5. Name your request and click Run. A moment later you’ll see your Airtable base data printed into your sheet:airtable-img7

Part 4: Handle Pagination

  1. Airtable limits the number of records returned in each request. By default, only 100 records will be returned unless you use the ‘offset’ parameter as described in their documentation.
    airtable-img8
  2. To access more than 100 records, add the ‘offset’ parameter like this:
    page 1: https://api.airtable.com/v0/appd80HFp4KuBLNQY/Dishes
    page 2: https://api.airtable.com/v0/appd80HFp4KuBLNQY/Dishes?offset=itrwyeZMguBUWaIqB/rec41l0SKwP8nSuWk

    You can find the value to populate the ‘offset’ parameter in the ‘offset’ field. It will only be present if there are still additional records available.

    airtable-img9
  3. With API Connector you can loop through pages automatically with cursor pagination handling (paid feature), like this:
    • API URL: enter your request URL as usual
    • Pagination type: cursor
    • Next token parameter: offset
    • Next token field: offset
    • Number of pages: enter the number of pages you’d like to fetch
      airtable-img10

6 thoughts on “Import Airtable Data to Google Sheets”

  1. Is it possible to export from Google Sheets to AirTable?

    Use case:

    I would like to import inventory data from our inventory system into Google Sheets using a schedule, after which the data is migrated to AirTable.

    Ideally, I’d get the data from our API directly into our AirTable Base, however, I cannot seem to find a service which doesn’t limit you on calls whilst being down to earth on price!

    Any suggestions will be much appreciated!

    PS
    There are 2000+ rows of data which will be brought in via the API and this will need to be scheduled to run ever 5mins.

    Reply
    • There are definitely ways to get data from Sheets to AirTable but unfortunately I’m not familiar enough with it to recommend anything beyond what I see in a Google search.
      I also see an issue with this plan, which is scheduling every 5 mins. Google limits add-ons to running scheduled calls once an hour, if you need it more frequently you would need to make a custom apps script as those aren’t subject to the same limitations. Sorry for the inconvenience but I hope that helps prevent you from wasting time. It sounds like you’ll probably be better off using an AirTable add-on (maybe this one: https://datafetcher.io/).

      Reply
  2. Hey Ana,

    Thank you so much for your swift response. Your dedication to the product is admirable :).

    Shame to hear of the limitation’s with Google Sheets nonetheless I’ve decided to switch tac and use Azure Logics Apps to get the data into AirTable directly.

    Thank you once again, Ana :).

    Reply
  3. This is amazing! Thank you! I have a question about the variable name.

    The import is successful, however, the header cell shows ‘records » fields » Number of Shares’ instead of ‘Number of Shares’. Do you by any chance know if there is a way to change this? or it is something with the Airtable API?

    Reply
    • Hi Elisa, the field names reflect the path to the field in the underlying JSON, so that means Number of Shares is nested within the records and fields arrays/objects.
      You could probably address this by restructuring the data using a JMESPath expression (e.g. adding records[*].fields in grid mode), or you can just create a second summary sheet with your desired field names and pull in your data with a QUERY() function.

      Reply

Leave a Reply to Anton Cancel reply