Help

Slack Notifications only on New Table Record

Topic Labels: Integrations
1214 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Will_Be
4 - Data Explorer
4 - Data Explorer

So, I know this is super simple in Zapier but I didn’t want to setup a Zap for what should be integrated.

Send Slack Notifications on New Record in Table.

That’s all I wanted, not ALL updates, that’s beyond annoying. In general, new records in a table are going to be useful for notifications but a running audit log is just going to be a flood.

So I’m sharing this solution for (a) validation and (b) to help others.

It appears AirTable isn’t actually firing an event off when a new record is added but is simply polling like other services. So you can’t just create a View that, for example, filters based on a Last Modified field being empty (which I thought we be delightfully clever) or Last Modified and Created date/time fields being the same.

So, what I did was created a formula field that used both Last Modified and Created fields to give the filtered view I was going to use for Slack Notifications with enough linger time to fire a notification but not stay forever and give notifications for every - single - field - update.

The formula field I named New Record? and used this formula:
IF(DATETIME_DIFF({Last Modified},{Created},"m")<2,TRUE(),FALSE())

The formula basically asking, was this record modified within 2 minutes of the record being created. If it is beyond 2 minutes, New Record? is false.

Then simply created a new view New Records - Slack Notifications (you can name it whatever, obviously) and filtered Where New Record ≠ 0 (you could also filter where new record? = 1, should work fine).

Now my big assumption here is that AirTable is polling every 2 minutes (or less). If it isn’t, then records will be missed.

It took me too long to figure out and should have been obvious sooner but it was unclear to me how AirTable was doing Slack notifications.

If I missed anything or someone has suggestions for improvement, I welcome them!

0 Replies 0