DEV Community

Tanglement
Tanglement

Posted on Originally published at tanglement.ai

Sync Airtable to Google Sheets automatically

To keep a sheet in step with Airtable you need something that re-reads Airtable on a schedule. The common options are an automation service, a script, or an add-on.

Free way: a script with the Airtable API

  1. Create a personal access token in Airtable (Builder hub > Personal access tokens) with read access to your base.
  2. In Apps Script, call https://api.airtable.com/v0/BASE_ID/TABLE with the token in an Authorization header.
  3. Follow the offset value until it is gone; Airtable returns 100 records a page.
  4. Write the rows, then add a time-driven trigger.

You will also need to turn linked record IDs into names and handle field renames yourself.

How to export Airtable to Google Sheets

Airtable can download any view as a CSV file, and Google Sheets can import CSV. That works for a one-time copy.

Free way: CSV export and import

  1. In Airtable, open the view you want. Filters and sort apply to the download.
  2. Click the view menu next to the view name and choose Download CSV.
  3. In Google Sheets, File > Import > Upload, pick the CSV, and choose Replace current sheet or Insert new sheet.
  4. Repeat every time the data changes.

Linked records come out as text, attachments as file links, and nothing updates on its own.

Airtable linked records in Google Sheets

Through the API, a linked record field is a list of record IDs like recXXXXXXXXXXXXXX. A CSV download shows the primary field text instead, but loses the link.

Turning IDs into names yourself

  1. Import the linked table too, with its record ID in one column.
  2. In the main sheet, split the ID list into separate cells.
  3. Use XLOOKUP or VLOOKUP against the linked table to get each name.
  4. Join the names back with TEXTJOIN if you want them in one cell.

The tool I made for this

I make and sell Airtable to Sheets. Import Airtable bases, tables and views into Google Sheets: linked records, attachments, hourly refresh, two-way push.

Top comments (0)