Help

Re: Pause or Delay in Automations

Solved
Jump to Solution
14271 0
cancel
Showing results for 
Search instead for 
Did you mean: 
egordin
7 - App Architect
7 - App Architect

Is it possible to delay an action from happening? I really like Slack notifications for new records, but I’d like the action to wait say, 1 minute after the record is created so that I can finish adding all of the fields. Is that possible?

24 Replies 24

@ScottWorld

Thanks Scott, I appreciate it!

I tried exactly what you suggested but the problem is what I previously described - a placeholder image is uploaded immediately while the actual file uploads in the background, so it triggers the “Attachment field is not blank” filter before it’s done uploading.

I suspect the placeholder image is done as a UI thing so you know that a file is uploading, but the result is that you can’t actually write a rule that says “Run this action when the file is finished uploading”.

Uploading of attachments can be a bit tricky. As @Mike_Mauer mentioned, there is a delay between when an attachment field is no longer considered blank and when the image is actually uploaded. And in some cases, if Airtable cannot retrieve the attachment from the url, the image might not ever become fully attached.

setTimeout does work in a scripting app (even though the editor complains about it), but it needs to be called correctly. However, I wouldn’t use setTimeout in a Scripting action for an automation. Scripting actions must complete within 30 seconds.

Instead, I would go about this with a slightly different technique. I would create a new formula field that checks to make sure that there is an attachment and that the last updated time was a couple of minutes before NOW(). Then I would run the automation off of the when a record meets conditions on the formula field. The automation might not run until several minutes after the attachment is actually uploaded (due to the delays in when NOW is recalculated, but it will run automatically, and it won’t run unless the attachment is present.

IF(
  AND(
    {Attachment},
    DATETIME_DIFF(
      NOW(),
      LAST_MODIFIED_TIME(Attachment),
      'minutes'
    ) > 1
  ),
  "run automation"
) 

Great solution, @kuovonne! :smiling_face_with_sunglasses: :raised_hands:

Mike_Mauer
6 - Interface Innovator
6 - Interface Innovator

@kuovonne

This is very clever, thank you! I’ll give it a shot tonight and report back.

I just put an explanation and working demo of this setup on my website.

This is awesome, @kuovonne!!

Just tested it out and it works! Very clever solution, thank you.

I’m not 100% sure we can consider this completely resolved, but for anyone who is reading this in the future here is the current status:

You can not pause or delay automations by a specific amount of time in Airtable. What you can do, however, is use @kuovonne’s method, which will allow you do delay things in increments of 5-15 minutes (the range is dependant on how often Airtable refreshed your NOW() command).

buildsomething
4 - Data Explorer
4 - Data Explorer

I've been looking into ways to fix this problem for myself, and the best thing I came up with was to create 5 steps (check box fields). 

PDF gets generated upon form submission - "Cert In" gets checked when "PDF" not empty - "Step 1" gets checked when "Cert In" is checked- Same for "Step 2" ---> "Step 5". After "Step 5" box is checked AND "PDF" not empty AND "Cert In" is checked, then send "PDF" to user email and mark "Cert Sent" as checked.

Works every time. 

Hi @kuovonne great solution. I have tried it and I think it is what I was looking for. The only thing is that the automation is working only when running test (I have this problem also with other implementations of this automation). Can you or anyone help?

So I have a grid with supply quantity and date of an order. Sometimes not the whole quantity is shipped, so I wanted an easy form (I'm using interfaces), where my colleagues write the shipped quantity. So, to sum up:

- if the shipped quantity is the same as the expected supply quantity, great, nothing happens and the record changes status to "shipped";

- If shipped quantity is different from zero and the difference with the expected quantity is non zero, the record changes to "shipped" status, the field of the expected shipment (it must be it, as it is the visible field in all the interfaces and statistics) should update and a new record in which the expected next shipment amount is the difference between what should have been shipped and what was really shipped.

I hope I explain myself, it's easier to see than to say. So airtable fails to do this operation. Before using the interfaces, my boss would go to the database and change the expected supply with the shipment quantity; an automation would run with no problem and a new record with the remaining amoun would be created.

At first, instead of using a delay system as the one above, I would just change the expected supply field via the form, but I had many Issues as the automation would run before I could finish typing the number, creating many discrepancies.

Thank you


SORRY, missing words

- If shipped quantity is different from zero and the difference with the expected quantity is non zero, the record changes to "shipped" status, the field of the expected shipment (it must be it, as it is the visible field in all the interfaces and statistics) should update and a new record should create in which the expected next shipment amount is the difference between what should have been shipped and what was really shipped.