Help

Using When Record Matches Conditions For A Specific Date & Time

Topic Labels: Automations
7577 9
cancel
Showing results for 
Search instead for 
Did you mean: 
Nathan_Thadani
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi Community! I could use some help

Trigger Conditions:
When Date Field (“Send Date”) is exact date 6/25/21 PDT.

Action Conditions:
Send email via Gmail

Trigger seems to work fine. I can specify the date but can’t choose the time. Not sure what I’m doing wrong but any help would be greatly appreciated.

Thanks in advance!

trigger
image

9 Replies 9

If the Send Date is controlled by a field value then you shouldn’t be using a static date in the Automation’s trigger condition. You want “When {Send Date} is today” to get it to send on the correct day.

Since you have a time component, you should probably invest in a Formula field that does IF({Send Date} <= NOW(), "✔️"), and adjust your Automation trigger to be “When {Formula field} is not empty”.

To better account for timezones, try the formula:

IF(
   DATETIME_FORMAT(SET_TIMEZONE({Send Date}, 'America/Los_Angeles'), 'X') <= 
   DATETIME_FORMAT(SET_TIMEZONE(NOW(), 'America/Los_Angeles'), 'X'), 
   "✔️"
)

Thank you! This is my first attempt at an automation. Do I need to create two conditions under the single trigger like this?

test formula

Thanks!

You likely only need the first trigger condition, but having both there shouldn’t prevent the automation from working properly.

Thanks for your help! I must be doing this completely wrong. Just tried testing it out and the trigger won’t bet set off at a specific time. Here’s a screenshot of the formula you suggested to use.

time date

If I want this trigger to be set off at, let’s say, 6/25/2021 13:00 - am I putting this time in formula field? Thanks!

There was no need to replace “X” with a date. DATETIME_FORMAT() takes two arguments, the first is the date to be formatted (in this case its either {Send Date} or NOW() in a particular timezone) and the second is a date format (in this case that format is “X”). In Airtable, “X” is shorthand for a date formatted as a Unix timestamp. All supported formats are listed here.

Assuming America/Los_Angeles is the correct timezone for you, insert the formula I gave exactly as I gave it. The time at which the Automation will be triggered is dependent on the date/time you enter in {Send Date}. If its supposed to be sent at 1pm, then the {Send Date} field should say 1pm.

Hi again,

Updated everything that was mentioned previously but trigger still isn’t working.

time trigger

As you can see, Send Date Formula which contains the formula does not have the check mark sign yet the time has already passed. Any idea what I’m doing wrong?

Thank you!

Works for me. If you refresh the page does the checkmark get added?

Okay, it works!

I guess one follow up question. If I want it to send in the middle of the night, while not at my computer, will it still run? Or does the page need to be refreshed?

According to Airtable’s help articles, Formula field’s refresh NOW() functions every five minutes while the base is open and every hour when the base is closed. With that in mind, it may behoove you to account for one less hour in your formula. That could be done with DATEADD({date}, -1, 'hour')