Help

How to create a changelog of major changes in Airtable

Topic Labels: Admin Data
1034 5
cancel
Showing results for 
Search instead for 
Did you mean: 
jmsheldon
5 - Automation Enthusiast
5 - Automation Enthusiast

I'd like to have a changelog, ideally in Slack, that gets added to whenever a base, table, or field is created or deleted, and whenever a field name or type is changed. However, I couldn't find any functionality to allow this. Has anyone found a workaround for it? Thanks!

5 Replies 5
Joseph_Roza
7 - App Architect
7 - App Architect

There's nothing truly built in that offers that functionality (that I know of), so you'll have to build it out yourself with automations and Last Modified Time fields. That won't notify you of changes to Bases or Tables, but you could monitors fields and records that way.

Maybe you could use the scripting block to monitor tables, but again, I'm not as familiar with, though there are some bigwigs in the community that offer scripting services.

Steve_Haysom
8 - Airtable Astronomer
8 - Airtable Astronomer

I think you would need to make use of the REST API for retrieving base schemas, which lists all the tables in a  base and their field definitions, although I'm not sure if for example you could detect whether a formula field's formula had changed. You can also lists bases too.

Ron_Williams
6 - Interface Innovator
6 - Interface Innovator

I personally don't have any experience with this but apparently you can create a slack channel that will monitor all changes to a base. https://support.airtable.com/docs/receiving-base-activity-notifications-in-slack?_gl=1*1mlr310*_ga*O...

Marko_K
5 - Automation Enthusiast
5 - Automation Enthusiast

It's possible as I've done it at my company, but there’s no trivial solution. I can give you a general outline with some pseudocode on how I approached it.  Feel free to reach out if you’re interested in a more detailed solution (marko@getsubsystem.com).

One thing to note, we store this data on an external database (Postgres) and the solution requires the use of the Web API.

Database Setup

Create four tables in your database:

  • bases (id, name, permission_level)
  • tables (id, name, primary_field_id)
  • fields (id, name, field_type, options)
  • audit (id, operation, table_name, old_value, new_value)

Database Triggers

First, form a function to update the audit table:

 CREATE OR REPLACE FUNCTION audit_trigger()

Subsequently, establish triggers for the operations you plan to track:

 CREATE TRIGGER audit_trigger_insert
 CREATE TRIGGER audit_trigger_update
 CREATE TRIGGER audit_trigger_delete

Server-side Operations

  • Implement a cron job to poll bases. 
  • Extract schemas and retrieve tables and fields.
  • Diff the results against the existing data in your database.
  • Conduct necessary database operations based on detected differences. All changes will be logged in your audit table.

Note: This strategy relies on polling. It's not event-driven/real-time. Still, poll frequently enough and you'll have a decent approximation of a real-time monitoring experience.

For an expanded guide or tailored code examples, feel free to contact me.

Now that is cool. I heard they added something like this, but I hadn’t looked into it. Thanks for sharing!