Run automation after an attachment is uploaded

Goal

You want to run an automation when an attachment is created. However, because attachments take several seconds to upload, you cannot simply run the attachment as soon as the attachment field isn't blank.

How to setup this solution

  1. Create a formula field in the table that changes values a few minutes after the attachment field is last updated.
  2. Setup the automation with the trigger when a record matches conditions.

The formula field

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

Notes on this method

This method relies on Airtable recalculating the formula field behind the scenes. Officially, the documentation states that the results of the NOW() function is not updated continuously. In practice, NOW() is recalculated in varying intervals of about 5-15 minutes. Thus although the formula is set to provide a value one minute after the attachment field has a value, in practice the automation won't run until several minutes later.

Demo Base

Test it out