Automation help: "sleep" a few minutes before sending a Slack notification

We’re using Airtable as a CRM on my team. One use case is to send a notification to our team’s Slack channel when a record is updated. The automation looks for recently modified records in a table that stores check-in records (one record per call or outreach activity). The trouble is that we often get multiple notifications when one would have been just fine; the extras are just noise. Here’s what I mean:

SLACK MESSAGE 1 [12:01 PM]
Person A updated record B
“lorem ipsum dolor sit amet”

SLACK MESSAGE 2 [12:02 PM]
Person A updated record B
"Lorem ipsum dolor sit amet qua." (All that changed here was a couple characters and a new word).

Can the Airtable automation wait for 5-10 minutes before sending these update messages? Or, as a complementary solution, is there a way for the Slack notification to highlight only the parts of a record’s field that have changed?

Here is our current configuration:
image

Hi there,

Unfortunately, there are no delays after the automation has triggered, but here you have a way to delay an automation from running.

Best
Sergio
https://devblocks.agency
If this reply fixed your problem, please mark it as a solution :white_check_mark:

2 Likes

Create a new formula field in your check-in table, let’s call it ExampleFieldName:

VALUE( 
    FROMNOW( 
        IF( 
            LAST_MODIFIED_TIME(), LAST_MODIFIED_TIME() , 
            CREATED_TIME()), NOW()
    ) 
)

This will return the rough number of minutes since any given record was last modified or created (if it was never modified after being created).

You should be able to easily modify this formula or create another one that references its value, then returns true||false||1||0||“automation go”||null or whatever trigger you want your automation to wait for before the processing starts.

I suggest setting the threshold at around 16-20 by doing something like:

IF(ExampleFieldName > 15, "Automate", "Wait")

Either in a new formula or by setting up a conditional View that only shows recoirds whose ExampleFieldName value is over 15, then having your Automation scan “only” records in that view.

That’s because the NOW() call only gets updated four or five times per hour. There are ways to be way more precise with this targeting by writing a custom automation script, but that doesn’t sound like it’s necessary in your case.

Also @ismail_crc, I’m assuming your automation is already keeping track of the processed records in one way or another as the above example doesn’t account for that.

EDIT: Forgot to add that you might want to set your Formula field formatting options to double-precision decimals instead of ‘Duration’ as the latter would just require additional formatting for no benefit due to the asynchronous nature of the NOW formula.

Hey Dominik! I was trying to follow your method, but the formula is just returning ‘0’ - any idea why?

As I said, your field settings can affect the output, based on the exact formula.

If you can’t get the above to output, remove the value wrapper:

FROMNOW(IF( LAST_MODIFIED_TIME(), LAST_MODIFIED_TIME() , CREATED_TIME()))

And paste it to a new formula field. You should then be seeing this:

From here, just return the wrapper and adjust the settings as neccessary to get raw, steadily changing numbers.

Otherwise, I’m out of ideas, Maybe contact Airtable support but reading through the docs would probably be more worthwhile. Here’s an example of a super useful reference regarding formatting

1 Like

Amazing - thank you very much!