Hi there,
I have the automation example in Airtable that sends a digest email of certain records for yesterday (in our case, overrun on tasks). On days when there was no overrun, the email would still send but would be blank, which is not appreciated by management.
I found this script in the forums here that helps prevent the email going out BUT it means I get an error alert & email instead, and it makes me go and check the automation is still working:
// A script to stop the automation running when no records are found.
// This prevents blank emails being sent.
// See: https://share.support.airtable.com/2NuwnyDD?method=GET
let numRecordsFound = input.config().numRecordsFound;
if (numRecordsFound < 1) {
throw Error("No records were found. Aborting so no blank emails are sent.")
}
Is it possible to stop or exit the automation silently, without throwing an error?
Many thanks in advance,
Chris