Aug 14, 2023 12:06 PM
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!
Aug 14, 2023 01:39 PM
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.
Aug 14, 2023 02:30 PM
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.
Aug 14, 2023 03:09 PM
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...
Aug 14, 2023 03:43 PM - edited Aug 14, 2023 03:44 PM
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:
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
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.
Aug 14, 2023 04:16 PM
Now that is cool. I heard they added something like this, but I hadn’t looked into it. Thanks for sharing!