Sep 09, 2022 05:40 AM
Hey there! I am trying to stream data from an Airtable base to a local file.
I am working in go and using this client airtable package - github.com/mehanizm/airtable - Go Packages
I want to be able to detect whether a record has been modified, without having to use the original data and comparing it to the current data in the base.
A solution I explored was to add the “Last modified time” field to all records, which would solve all my problems. But there is no way of doing that through API and has to be done manually. Not a great user experience!
I also am aware there is a webhook but am not keen to go down that route.
Is there any automated way I can get the “Last modified time” or any information that a change has been made and can narrow it down by the record?
Thanks!
Sep 09, 2022 06:48 AM
You don’t need to add “last modified time” to all records. You just add it once to the entire table, and it will report back the last modified time for all records.
The API is setup to interact with your base AFTER it is setup. It is not designed to create the base (i.e. fields or any other structural components).
Sep 15, 2022 06:42 AM
Thanks for the reply!
Unfortunately I am trying to write a program for other users, and it would be a bad user experience to ask them to add a “last modified time” field for every table they want to transfer data from.
I want them to simply have to enter their base details and key, and let me do the rest!
Is there any other way of detecting changes?
Sep 15, 2022 07:03 AM
The API will always return the “createdTime” and the “id” of each record without requiring any additional fields to be created.
Otherwise, you will need to create the fields that you want.