You can do this with Airtable automations and a Scripting Action, although it might not run at exactly 18 hours.
Create a new formula field that calculates if the record was created over 18 hours ago.
IF(DATETIME_DIFF(NOW(), CREATED_TIME(), 'hours') > 18, "delete")
Use the When record matches conditions trigger, and set the trigger for when the formula field is not empty.
scripting action input variables
Setup two input variables:
recordId for the recordId from the triggering record
tableName for the table name (simply type the name)
scripting action code
let inputConfig = input.config();
const recordId = inputConfig.recordId;
const table = base.getTable(inputConfig.tableName)
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. However, multiple users have used automations with
NOW updating behind the scenes, although the actual execution time might be several minutes after the target time.
Airtable’s When record matches conditions trigger is relatively new, and it seems to behave like the When record enters view trigger, without having to actually create a view. Thus, if a record already meets the conditions before the automation is turned on, it will not trigger the automation, just as the record would not “enter” the view because it would already be “in” the view. The only exception is the record retrieved when testing the automation.