Search API Connector Documentation
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.
Contents
- Before You Begin
- Part 1: Get your Airtable API Key
- Part 2: Fetch Data from Airtable
- Part 3: Create a Custom Request
- Part 4: Handle Pagination
- Part 5: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get your Airtable API Key
- While logged into Airtable, click the Account icon in the top right corner.
- Scroll down the page and click Generate API key:
- An API key will appear. That’s it! Copy this and keep it safe, we’ll need it shortly.
Part 2: Fetch Data from Airtable
The easiest way to get started with the Airtable API is through API Connector’s built-in integration.
- Select Airtable from the drop-down list of applications
- Under Authorization, enter your API key with the word
Bearer
in front of it. - There’s only one endpoint for Airtable so skip straight to the required
base_id
andtable_id
variables. Airtable provides these values for you in the documentation at https://airtable.com/api, so grab them there and copy/paste them in. - For now you can skip the non-required parameters. If you like,you can use them later to customize your report.
- Set a destination sheet, name your request, and click Run to see data from your Airtable base in your sheet.
Part 3: Create a Custom Request
Alternatively, you can run your own custom requests instead of using API Connector’s pre-built integration. When you create a custom request, add your complete URL into the request URL field and a Header where Key = Authorization
, Value = Bearer your_key
By default, the Airtable API will return all the data in your base, which can result in many more columns than you need. To limit the data you return, add a parameter for each field you want with the syntax fields[]=field name, like this: https://api.airtable.com/v0/appd80HFp4KuBLNQY/Dishes?fields[]=Name (English)&fields[]=Description
Part 4: Handle Pagination
- Airtable limits the number of records returned in each request. By default, only 100 records will be returned.
- To access more than 100 records, loop through with the offset parameter as described. With API Connector you can do this automatically with cursor pagination handling (paid feature), like this:
- Pagination type:
cursor
- Next token parameter:
offset
- Next token path:
offset
- Run until: choose when the request should stop running
- Pagination type:
Part 5: API Documentation
Official documentation: https://airtable.com/api
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.
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/).
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 :).
Thank you! I’m glad you found a solution, best of luck with your data 🙂
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?
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 can shorten this with the “truncate headers” option in Output Options.
Update: you can also edit field names through the visual field editor.
Hi, it appears that some of my columns are importing as encrypted data. I noticed this is happening for fields that are the unique keys for other tables. Any assistance here?
Hey Brian, we don’t change the data that comes back from the API, so it looks like this may be related to this security feature from Airtable: https://support.airtable.com/hc/en-us/articles/203466199-Airtable-security-practices. I don’t see anything in their documentation about how to decrypt the data though, and I haven’t seen this happen on my side, so you may need to check with their support on this one.