Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

How to know the current hour?

cancel
Showing results for 
Search instead for 
Did you mean: 
Ambroise_Dhenai
8 - Airtable Astronomer
8 - Airtable Astronomer

I’m trying to send notifications while avoiding them being sent at midnight UTC (one of the trigger conditions is the number of days since an event has happened).

I’d like them to be sent at 6pm UTC+2, not at midnight, but I also want them to trigger based on conditions, and can’t use the “Scheduled time” because then it’d run only one time for all the record that matches (I need to run it once per record), as I’m sending one SMS to each user.

Is there a way to have a formula field with the current time of the day (the hour)? Or another way?

10 Comments
Vivid-Squid
11 - Venus
11 - Venus

Hi @Ambroise_Dhenain

NOW()

Will give you the current time.

This function updates when the formula is recalculated, when a base is loaded, or otherwise roughly every 15 minutes when a base is open. If the base is closed, it will update approximately every hour only when the base has time-dependent automation triggers or actions, or sync dependencies.

Ambroise_Dhenai
8 - Airtable Astronomer
8 - Airtable Astronomer

I tried to use TODAY() instead of NOW() so far, I thought they were the same.

I think this might just work, considering I need to send SMS “around some time”. The unreliability might not be an issue.

Vivid-Squid
11 - Venus
11 - Venus

I do not think that TODAY() returns the time.

While similar to the TODAY() function, NOW() returns the current date AND time.

kuovonne
18 - Pluto
18 - Pluto

TODAY() returns the GMT date with a time of midnight GMT for when it was last recalculated. The time of TODAY() will always be GMT midnight, although the actual date and time may differ from what you expect depending on whether or not you display the result in local time and what time zone you are in.

NOW() returns the GMT date and time for when it was last calculated. Again, this value might be different from what you expect based on your time zone, the timezone settings for your field, and when it was last recalculated.

AlliAlosa
10 - Mercury
10 - Mercury

Just popping in with a word of caution - if you have a large base with complex relationships, using NOW() can potentially impact performance. I speak from experience :smiling_face_with_halo: I now try really hard to avoid using it at all costs (lame pun very much intended).

My workaround to trigger many automations at a specific time is usually something like this:

  1. Set up an automation triggered at a specified time
  2. Use a scripting step to find the applicable records and update a value (I usually use a single select field and set the value to something like “ :zap: Run”
  3. Setting the single select value can then trigger a second automation for each applicable record, perform whatever action you want (I.e send an SMS), and then finally set the value of the single select to something like “ :white_check_mark: Complete”. This allows you to trigger the automation again if you need to.
Ambroise_Dhenai
8 - Airtable Astronomer
8 - Airtable Astronomer

Good feedback and good workaround. Thanks for sharing.

I haven’t done it your way, and I find it a bit complicated (and it consumes 2 automations) but it definitely has its “pros”. I’d probably rather simply write a script, if possible, or use Zapier/Make to avoid using 2 out of the 25 automations.

Wouldn’t it be for that 25 limit, your way would probably be better in most cases.

kuovonne
18 - Pluto
18 - Pluto

You can now have 50 automations.

AlliAlosa
10 - Mercury
10 - Mercury

You are entirely welcome and thank you for the feedback as well! I totally agree that it is a bit complicated, and I wish it didn’t consume two automations. I’ve thought about ways to condense it into one script, but if you want to perform an action such as sending a personalized email to each record, that script would likely need to involve calling an API and at that point I’d rather just use an extra automation (as long as I have one to spare, lol).

Ambroise_Dhenai
8 - Airtable Astronomer
8 - Airtable Astronomer

When did that change? I’m following all updates and I haven’t since that one.

kuovonne
18 - Pluto
18 - Pluto

The increase to 50 named automations per base happened earlier this month. You can also arrange automations in sections, so you can group the two automations involved in this workflow together.