Hi,
I managed to set up a fairly clean two-way sync between Airtable & Glide Big Tables. Whilst there is some technical aspect of setting this up, it runs pretty much instantly and I am pretty happy with how reliable it has been so far.
Project Context:
- I have create a directory website (in Webflow)
- I control all of my directory data from Airtable and sync it with Whalesync
- I have no create a Glide portal for the business owners to control the data on their pages
How the syncing works:
- Webflow ↔ Airtable (via Whalesync)
- Airtable → Glide (via Airtable Automation and Scripts)
- Glide → Airtable (app interaction triggers a webhook in Airtable Automations that retrieves the Glide record and updates the corresponding Airtable record)
Create/Update in Glide
The way this script works is that it:
- Is triggered by a condition in Airtable (more on this later)
- That triggers a script in Airtable automation that retrieves the Airtable record
- The script then maps all Airtable fields to its corresponding Glide fields
- The script checks if the Glide Record already exists by checking if “Glide Row ID” for that record in Airtable exists or not
- If it exists, it updates the existing Glide record, else it creates a new record
- If it creates a new record, it updates the Airtable record with the Glide Record ID for future reference.
- For updating and creating new Glide records, I also save a timestamp in Airtable for the last time Glide was updated, to ensure the records are not out of sync.
Glide → Airtable: Upsert/Delete User Generated Content
To be keep Airtable in sync with changes made in Glide, I have two scripts that are triggered by webhook data being received from Glide.
At the end of my app interaction steps I added a “Trigger webhook” action that passes through the Glide Row ID.
I have one trigger for when a new record is created or an existing record is updated, and a seperate trigger for when a user deletes a record in Glide - the both work the same, the script just does the action that corresponds.
In the case of a record being created or updated in Glide, the script does the following:
- The script checks if the record exists in Airtable by checking for the Glide Row ID that was passed through.
- It then makes an API call to Glide to retrieve all of the latest data for that record.
- I then have field mapping set up that maps Glide fields to Airtable fields.
- Then I either update or create a record with the information provided via Glide.
- If a new record is created in Airtable, I update Glide with the corresponding Airtable ID for later reference.
- In both instances, I update Glide with a date time field for when the Airtable was last updated, so I can see if any records are out of sync.
Tips:
- I used my existing Airtable bases to create the schema of the Glide big tables that made mapping Airtable and Glide a lot easier.
Create Table - Glide API Docs - To avoid infinite loops, I would recommend setting up a condition-based trigger first in Airtable (i.e. when a checkbox is checked), so you can control when and what gets synced.
- I would only sync fields from Glide that users can actually change.
Final thoughts:
If you are using the native Glide/Airtable sync, this here is a lot faster and with Big Tables you won’t run into record limits.
Hopefully this is useful.