Jul 05, 2021 10:59 AM
I would like to automate posts to Twitter so that they send out both when “Ready to Publish” (status field) and at a specific date and time (date field with time).
I note that in the triggers, it allows for date but the most specific it gets is “today” and does not include the specific time.
Will it still post at the correct time if the automation is running or is this not possible in Airtable yet?
Solved! Go to Solution.
Jul 05, 2021 01:18 PM
Instead of using condition option to look directly at the {Publish Time}
field (guessing a name for now), I suggest adding a formula field named something like {Publish Trigger}
, with a formula something like this:
NOW() > {Publish Time}
That will output a 1 when the current time—represented by NOW()
—is later than the publish time, and 0 otherwise. Then you can set your automation conditions to be when {Status}
is “Ready to Publish”, and {Publish Trigger}
is 1. Or you could condense both conditions into the formula, and then the only automation condition would be when {Publish Trigger}
is 1:
AND(Status = "Ready to Publish", NOW() > {Publish Time})
There are two issues with this system that you need to be aware of:
NOW()
function doesn’t update constantly. It updates about every 15 minutes when the base is open, and roughly every hour when it’s not (according to the documentation), so the triggering isn’t going to be terribly precise. It’s also extremely unlikely to be an exact match, which is why I used >
to compare the two times, not =
NOW()
function calculates time based on GMT, not your local timezone. A more accurate method of comparison is to figure out your local timezone’s offset from GMT and add that many hours to the NOW()
value. For example, if your local time is five hours later than GMT, here’s that approach with 5 hours added to NOW()
.AND(
Status = "Ready to Publish",
DATEADD(NOW(), 5, "hours") > {Publish Time}
)
Jul 06, 2021 12:34 PM
Jul 05, 2021 01:18 PM
Instead of using condition option to look directly at the {Publish Time}
field (guessing a name for now), I suggest adding a formula field named something like {Publish Trigger}
, with a formula something like this:
NOW() > {Publish Time}
That will output a 1 when the current time—represented by NOW()
—is later than the publish time, and 0 otherwise. Then you can set your automation conditions to be when {Status}
is “Ready to Publish”, and {Publish Trigger}
is 1. Or you could condense both conditions into the formula, and then the only automation condition would be when {Publish Trigger}
is 1:
AND(Status = "Ready to Publish", NOW() > {Publish Time})
There are two issues with this system that you need to be aware of:
NOW()
function doesn’t update constantly. It updates about every 15 minutes when the base is open, and roughly every hour when it’s not (according to the documentation), so the triggering isn’t going to be terribly precise. It’s also extremely unlikely to be an exact match, which is why I used >
to compare the two times, not =
NOW()
function calculates time based on GMT, not your local timezone. A more accurate method of comparison is to figure out your local timezone’s offset from GMT and add that many hours to the NOW()
value. For example, if your local time is five hours later than GMT, here’s that approach with 5 hours added to NOW()
.AND(
Status = "Ready to Publish",
DATEADD(NOW(), 5, "hours") > {Publish Time}
)
Jul 06, 2021 12:34 PM
This is such a helpful reply. Thank you!
Jul 06, 2021 02:31 PM
Glad to know that you got the answer you were seeking! If you would, please mark my comment (the one above, not this one) as the solution to your question. You incorrectly marked your own comment as the solution. :slightly_smiling_face: This helps others who may be searching with similar questions. Thanks!
Jul 30, 2023 05:28 AM - edited Jul 30, 2023 05:29 AM
Now that Airtable has discontinued its Twitter automations (even for people who were successfully using their Twitter automations in the past), you can combine Justin’s formula above to instantly trigger a webhook in Make, which will then create your Twitter post.
Here is the link to Make’s Twitter v2 integrations, which works with both v2 of Twitter’s API and the free tier of Twitter. It also works with paid tiers as well.
Here is Make’s documentation on how to configure your Twitter API with Twitter’s API v2.
And, to trigger a Make scenario instantly from Airtable with no delays by using a webhook, check out this thread.
Also, there can be a bit of a learning curve with Make, which is why I created this basic navigation video for Make, along with the links to a few other Make training resources.
p.s. If you have a budget for your project and you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consulting — ScottWorld